

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
7 messages in net.sourceforge.lists.courier-users[courier-users] Re: Time issues| From | Sent On | Attachments |
|---|---|---|
| Joe Laffey | Jul 18, 2003 12:23 pm | |
| Sam Varshavchik | Jul 18, 2003 1:15 pm | |
| Joe Laffey | Jul 18, 2003 1:37 pm | |
| Joe Laffey | Jul 18, 2003 8:11 pm | |
| Joe Laffey | Jul 19, 2003 8:33 pm | |
| Sam Varshavchik | Jul 20, 2003 12:59 pm | |
| Joe Laffey | Jul 20, 2003 8:24 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [courier-users] Re: Time issues | Actions... |
|---|---|---|
| From: | Sam Varshavchik (mrs...@courier-mta.com) | |
| Date: | Jul 20, 2003 12:59:05 pm | |
| List: | net.sourceforge.lists.courier-users | |
Joe Laffey writes:
I think we have some sort of bug here. I have two courier servers. Both run 0.42. Both run NetBSD 1.6.1. One is PPC, the other x86.
in the rfc822 config.h both get configed to #define USE_TIME_DAYLIGHT 1
However, it would appear that locatime already accounts for daylight savings time (even the manpage says so) on these systems.
This has nothing to do with what localtime does. The objective here is to obtain the difference between the local time, that is what localtime gives, and GMT.
Please post what the NetBSD man page actually says. For reference information, here's the Linux version:
... timezone with the difference between Coordinated Universal Time (UTC) and local standard time in seconds ...
The global timezone variable is defined to contain the difference between GMT, and the local standard time. Then, tm_dst is defined as follows:
tm_isdst A flag that indicates whether daylight saving time is in effect at the time described.
The objective here is to take the local time, computed by localtime(), and compute the difference between that, and GMT. Therefore, the time zone difference is computed by taking timezone, and adding one hour if tm_isdst is set.
Those two lines of code cannot be removed, at least on Linux. You should again review localtime's manpage. You're claiming that the 'timezone' variable is always set by the localtime() function, to indicate the difference between the local time given as its input, and GMT. So, what you're saying that if localtime() receives input for when standard time is in effect, at exit timezone will be 21600 (that is, -0600 GMT), but when localtime() receives input for when daylight time is in effect, at exit timezone will be 18000 (that is, -0500 GMT). That doesn't sound right.
When run this code produces:
[10:25pm]host ~> ./a.out offset:-0400 timezone:18000 [10:25pm]host ~> date Sat Jul 19 22:25:43 CDT 2003
So your timezone right now indicates -05h GMT, which is correct for CDT. You are now implying that if you were to run localtime() and provide a time interval when standard time in effect, at exit timezone would be 21600, or -06h GMT.
Try feeding a January time to localtime(), to find out whether timezone will now read 21600. This would mean a NetBSD-specific hack, in which case I'll need the output of config.sub to code a test for it. That would be unfortunate, because that would mean that NetBSD's timezone functions are not thread-safe.







