You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok, so I guess this is a difference in behavior because we don't use the same TZ functions as MRI. Here's part of the manpage for "tzset":
The tzset() function initializes time conversion information used by the library routine localtime(3). The environment variable TZ specifies how this is done.
If TZ does not appear in the environment, the best available approximation to local wall clock time, as specified by the tzfile(5)-format file /etc/localtime, is used.
If TZ appears in the environment but its value is a null string, Coordinated Universal Time (UTC) is used (without leap second correction).
If TZ appears in the environment and its value begins with a colon (:'), the rest of its value is used as a pathname of a tzfile(5)-format file from which to read the time conversion information. If the first character of the pathname is a slash (/'), it is used as an absolute pathname; otherwise, it is used as a pathname relative to the system time conversion information directory.
If its value does not begin with a colon, it is first used as the pathname of a file (as described above) from which to read the time conversion information. If that file cannot be read, the value is then interpreted as a direct specification (the format is described below) of the time conversion information.
If the TZ environment variable does not specify a tzfile(5)-format file and cannot be interpreted as a direct specification, UTC is used.
There's multiple things in there we don't support, like the special colon form, but the last line is key.
Now, what to fix...
It seems like it would be a nice-to-have feature in Ruby that it will tell you if you have a bogus TZ, doesn't it? Perhaps we should just make this into a verbose-mode warning?