Summary

locale egg fails when TZ is "UTC"

Metadata

Description

In a cgi program called through Apache, I get the following error when I (use locale):

   bad timezone STD offset: "UTC"

Source of the error is the function parse-posix-literal-timezone, where offset-re fails to match. If I change the environment variable TZ to "UTC+0" in my .htaccess, there is no error.

Relevant system information:

   $ cat /etc/debian_version 
   6.0.1
   $ chicken-status|grep -m1 locale
   locale .......................... version: 0.6.12
   $ csc -V
   (c)2008-2010 The Chicken Team
   (c)2000-2007 Felix L. Winkelmann
   Version 4.5.0 
   linux-unix-gnu-x86 [[|manyargs dload ptables ]]
   compiled 2010-06-17 on biber (Linux)

Also reproduced with Chicken 4.7 on another system by calling (parse-posix-literal-timezone "UTC") directly from a repl. (I had no trouble loading the locale egg on that other system.)

Changes and comments

[2012-04-16 15:10:51 UTC] felix removed milestone 4.8.0

[2012-10-31 22:00:03 UTC] kon changed status from new to assigned

[2012-10-31 22:00:03 UTC] kon set owner to kon

[2012-12-13 19:18:46 UTC] kon changed status from assigned to closed

[2012-12-13 19:18:46 UTC] kon set resolution to invalid

[2012-12-13 19:18:46 UTC] kon wrote:

Not sure what to do about this. TZ=FOO is ambiguous, what offset should be assumed?

POSIX.1 specifies "std offset" (& "std offset dst [[offset]|],start[[/time]|],end[[/time]|]") where the offset is required. So TZ=UTC+0 is the correct form.