Talk:Date manipulation: Difference between revisions
Content deleted Content added
use Date objects, not text |
No edit summary |
||
Line 17: | Line 17: | ||
How about making the task work for any region? --[[User:Paddy3118|Paddy3118]] 03:15, 14 May 2009 (UTC) |
How about making the task work for any region? --[[User:Paddy3118|Paddy3118]] 03:15, 14 May 2009 (UTC) |
||
: Better yet, use Date or Time objects. --IanO |
: Better yet, use Date or Time objects. --IanO |
||
: The task does not specify what the answer should be, for this very reason. The result of the Tcl solution happens to show that I live in the Eastern time zone. --[[User:Glennj|glennj]] 10:36, 14 May 2009 (UTC) |
Revision as of 10:36, 14 May 2009
Task is Region specific
I live in the UK and tried the Tcl example: <lang tcl>loading history file ... 29 events added buffer line limit: 512 max line length: unlimited Main console display active (Tcl8.5.7 / Tk8.5.7) (HP DV8025EA) 30 % set date "March 7 2009 7:30pm EST" March 7 2009 7:30pm EST (HP DV8025EA) 31 % set epoch [clock scan $date -format "%B %d %Y %I:%M%p %z"] 1236472200 (HP DV8025EA) 32 % set later [clock add $epoch 12 hours] 1236515400 (HP DV8025EA) 33 % puts [clock format $later] Sun Mar 08 12:30:00 GMT 2009 (HP DV8025EA) 34 % </lang> As you can see, this is different from the answer given in the article.
How about making the task work for any region? --Paddy3118 03:15, 14 May 2009 (UTC)
- Better yet, use Date or Time objects. --IanO
- The task does not specify what the answer should be, for this very reason. The result of the Tcl solution happens to show that I live in the Eastern time zone. --glennj 10:36, 14 May 2009 (UTC)