Issue 1130 Local timezone must be set

Title Local timezone must be set
Priority not-our-bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, jaredj, kolmodin, kowey, thorkilnaur
Assigned To
Topics ProbablyEasy, UI

Created on 2008-10-07.09:35:35 by kowey, last changed 2009-08-27.14:12:41 by admin.

File name Uploaded Type Edit Remove
datenow.hs kowey, 2008-10-07.16:12:06 text/x-haskell
msg6255 (view) Author: kowey Date: 2008-10-07.09:35:25
It seems like if the TZ variable is not set in the environment, we get the
following dates output.

Mon Oct  6 20:30:43 Local time zone must be set--see zic manual page 2008 
  * Bnote

This was caught by our regression tests on Gentoo:

As I understand it, we are using the calenderTimeToString function to output
dates.  It would be if somebody could cook up a little test to see what it
outputs when the local timezone is not set.  Also, we could perhaps account for
this sort of situation by assuming UTC.

I'm marking this need-volunteer because it seems pretty clear what to do:
 * verify that this comes straight from calendarTimeToString
 * possibly write code to compensate
msg6266 (view) Author: kowey Date: 2008-10-07.16:12:05
Simple date script attached
msg6285 (view) Author: kolmodin Date: 2008-10-09.05:52:55
It turned out that /etc/localtime was not set on the testing machine.
Once it was set, all tests passed.

Apparently even running

 $ date

breaks when it's unset (says google). Should darcs warn the user his environment
is broken? Or just do what all other applications do? :)
msg6286 (view) Author: kowey Date: 2008-10-09.08:36:24
I don't think there's all too much we can do about this :-)

Marking not-our-bug, and resolved (since we know what the answer is).

Note that I had previously assumed that local timezone meant the TZ environment
variable, which was silly and wrong.
Date User Action Args
2008-10-07 09:35:35koweycreate
2008-10-07 16:12:10koweysetfiles: + datenow.hs
nosy: kowey, dagit, simon, thorkilnaur, jaredj, dmitry.kurochkin
messages: + msg6266
2008-10-09 05:53:01kolmodinsetnosy: + kolmodin
messages: + msg6285
2008-10-09 08:36:32koweysetpriority: bug -> not-our-bug
status: needs-reproduction -> resolved
messages: + msg6286
nosy: kowey, dagit, simon, thorkilnaur, jaredj, dmitry.kurochkin, kolmodin
2009-08-10 23:47:42adminsetnosy: - dagit
2009-08-25 17:30:26adminsetnosy: + darcs-devel, - simon
2009-08-27 14:12:41adminsetnosy: kowey, darcs-devel, thorkilnaur, jaredj, dmitry.kurochkin, kolmodin