Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-templating
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
acs-templating
Commits
69f42967
Commit
69f42967
authored
Jun 15, 2011
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- OpenACS Core:
Added patch for processing ]po[ DynField SQL dates
parent
5ffd39d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
date-procs.tcl
tcl/date-procs.tcl
+21
-1
No files found.
tcl/date-procs.tcl
View file @
69f42967
...
...
@@ -274,7 +274,27 @@ ad_proc -public template::util::date::get_property { what date } {
}
return 0
}
sql_date -
sql_date
{
if
{
1 ==
[
llength
$date
]}
{
set date
[
split
$date
"-"
]
}
# LARS: Empty date results in NULL value
if
{
[
empty_string_p
$date
]
}
{
return
"NULL"
}
set value
""
set format
""
set space
""
set pad
"0000"
foreach
{
index sql_form
}
{
0 YYYY 1 MM 2 DD 3 HH24 4 MI 5 SS
}
{
set piece
[
lindex
$date
$index
]
if
{
!
[
string
equal
$piece
{}]
}
{
append value
"
$space
[
string
range
$pad
[
string
length
$piece
]
end
]
$piece
"
append format
$space
append format
$sql
_form
set space
" "
}
set pad
"00"
}
return
"to_date('
$value
', '
$format
')"
}
sql_timestamp
{
# LARS: Empty date results in NULL value
if
{
$date
eq
""
}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment