>Does anyone else find the sign convention counter-intuitive? For
>example, it's true that 15:33:49 -0700 == 18:33:49 -0400. If the signs
>were the other way, that equation would actually look true.
According to the son-of-RFC822 internet-draft,
The zone specifies the offset from Coordinated Universal Time (UTC,
referred to as "Greenwich Mean Time") that the date and time-of-day
represent. The "+" or "-" indicates whether the time-of-day is ahead
behind Universal Time.
So, the offset variable (-0700) indicates the offset *from* UTC, while
you would like it to be the offset *to* UTC.
>Unfortunately, there's no way to set TZ that will convince strftime() to
>emit the numeric time zone indicators (as far as I can tell). And RFC
>822 doesn't recognize "UTC", so I have to use the outdated "GMT".
Note that son-of-RFC822 obsoletes non-numeric timezones (it requires
that they be accepted but not generated), in favor of offsets.