Re: date selectors using local time for comparison (Stephen Leake)

Stephen Leake <[email protected]>
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
Richard Hopkins <[email protected]> writes:

>> Hm. The tests must set some env variable so all times are UTC; that
>> would be required for consistency, with testers in several time
>> zones. But we should have at least one test that sets a different
>> time zone, to test stuff like this.
>> 
> Agree. Any ideas how we would do that?

In my bash shell, there's an environment variable TZ, set to
"America/New York". I assume that controls the time zone.

I just grepped for TZ in monotone/test/; this one looks promising:

./src/testlib.lua:912:  set_env("TZ", "UTC")

and this:

./func/date_formatting/__driver__.lua:17:      set_env("TZ", tz)

(There were a _lot_ of false grep hits on TZ occuring in mtn packet data!)


Searching at ask.com for "TZ environment variable" turned up this:

http://en.wikipedia.org/wiki/List_of_tz_zones_by_name

-- 
-- Stephe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.