Re: [Chicken-users] choosing right timezone for future date

2008-01-29 Thread Graham Fawcett
On Jan 28, 2008 5:27 PM, John Cowan [EMAIL PROTECTED] wrote: Graham Fawcett scripsit: Here's a demo program that does work: [snip] However, this doesn't really solve your problem, because it sets the offset and tzname to the current values, not to the values in effect at the time. I think

[Chicken-users] choosing right timezone for future date

2008-01-28 Thread Graham Fawcett
Hi folks, This may not be Chicken-specific, but is there an existing library that, given a date (year,month,day) and given the current locale, will tell me the timezone in which the date falls? I'm in the EST zone, but during warmer months, dates fall within the EDT zone. I'd like to be able to

Re: [Chicken-users] choosing right timezone for future date

2008-01-28 Thread Graham Fawcett
On Jan 28, 2008 2:12 PM, John Cowan [EMAIL PROTECTED] wrote: Graham Fawcett scripsit: This may not be Chicken-specific, but is there an existing library that, given a date (year,month,day) and given the current locale, will tell me the timezone in which the date falls? I The locale as

Re: [Chicken-users] choosing right timezone for future date

2008-01-28 Thread John Cowan
Graham Fawcett scripsit: This may not be Chicken-specific, but is there an existing library that, given a date (year,month,day) and given the current locale, will tell me the timezone in which the date falls? I'm in the EST zone, but during warmer months, dates fall within the EDT zone. I'd

Re: [Chicken-users] choosing right timezone for future date

2008-01-28 Thread Graham Fawcett
On Jan 28, 2008 3:45 PM, Graham Fawcett [EMAIL PROTECTED] wrote: strftime(3), which should be in unit posix but isn't, is your friend; it's the library routine underlying date(1). John, I'm seeing an odd behaviour with strftime on my machine; perhaps you've seen it before and might be able to

Re: [Chicken-users] choosing right timezone for future date

2008-01-28 Thread John Cowan
Graham Fawcett scripsit: My TZ is set properly, and using strace I see that the correct zoneinfo file is being accessed. date +%Z works properly. Any ideas? The problem with your test program is that tm is uninitialized, which strptime does not alter (since there is no zone information in the

Re: [Chicken-users] choosing right timezone for future date

2008-01-28 Thread Kon Lovett
On Jan 28, 2008, at 2:27 PM, John Cowan wrote: Graham Fawcett scripsit: My TZ is set properly, and using strace I see that the correct zoneinfo file is being accessed. date +%Z works properly. Any ideas? snip However, this doesn't really solve your problem, because it sets the offset