Skip to content

Commit

Permalink
Timeformat fix
Browse files Browse the repository at this point in the history
Debian:
date -Iseconds
2018-12-16T08:52:15+01:00

date +%Y-%m-%dT%H:%M:%S%z
2018-12-16T08:52:36+0100
  • Loading branch information
quickmic committed Dec 16, 2018
1 parent e79488f commit 9828c41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WebUI/www/config/cp_time.cgi
Expand Up @@ -143,7 +143,7 @@ set LOCATIONS {
proc action_put_page {} {
global env LOCATIONS TIMEZONES

set iso8601_date [exec date -Iseconds]
set iso8601_date [exec date +%Y-%m-%dT%H:%M:%S%z]
regexp {^(\d+)-(\d+)-(\d+)T(\d+):(\d+):(\d+)([+-]\d+)$} $iso8601_date dummy year month day hour minute second zone

puts "<div id=\"dragTime\">"
Expand Down Expand Up @@ -354,7 +354,7 @@ proc action_put_page {} {
cgi_text lat=[expr abs($lat)] {size="12"} {maxlength="12"} {id="text_lat"}
cgi_select lat_sign= {id="select_lat_sign"} {
#cgi_option "Nord" [expr ($lat>=0)?"selected":""]
#cgi_option "Süd" [expr ($lat<0)?"selected":""]
#cgi_option "Süd" [expr ($lat<0)?"selected":""]

cgi_option "\${dialogSettingsTimePositionLblOptionNorth}" [expr ($lat>=0)?"selected":""]
cgi_option "\${dialogSettingsTimePositionLblOptionSouth}" [expr ($lat<0)?"selected":""]
Expand Down Expand Up @@ -607,7 +607,7 @@ proc action_put_page {} {
}

proc js_to_iso_8859_1 {s} {
return [string map {Ä \xC4 Ü \xDC Ö \xD6 ä \xE4 ü \xFC ö \xF6 ß \xDF} $s]
return [string map {Ä \xC4 Ü \xDC Ö \xD6 ä \xE4 ü \xFC ö \xF6 ß \xDF} $s]
}

proc get_location_config {var_country var_city var_lat var_lon var_timezone} {
Expand Down

0 comments on commit 9828c41

Please sign in to comment.