From: lyndon@orthanc.ca (Lyndon Nerenberg (VE6BBM/VE7TFX))
Subject: [9fans] dst shift is shifty
Date: Sun, 27 Mar 2011 12:48:27 -0800 [thread overview]
Message-ID: <0063c64816641ec9e978b9223da09fcb@gandalf.orthanc.ca> (raw)
In-Reply-To: <9a8a1c6c03786d09caeda4a4d48183e2@ladd.quanstro.net>
> i tried to send this off-list, but your zone has no mx record.
> sorry to the rest of the list for spam.
And I tried a direct reply, but your MTA is convinced orthanc.ca has
no MX record. Which is odd since it most most certainly does. I've
noticed ndb/dns has been acting oddly lately, though. For the last
couple of months my CPU server has been complaining that
ftp.rfc-editor.org has a malformed IP address while my terminal has no
issue with it. It hasn't been annoying enough to track down since I
have a workaround, but something weirde is going on here ...
> anyway, lyndon could you check the timezones in
> /n/sources/contrib/quanstro/timezone/tz/Canada_*
> to make sure i haven't made any silly mistakes?
Attached is a trivial timezone file dumper I wrote this morning before
the benefit of coffee. When I examine the output of runs against
*_Pacific (the system's and Eric's new Canada_*) it strikes me that
the time shifts are happening at UTC time rather than the local
timezone offset. E.g., here is a sample of
/adm/timezone/Canada_Pacific:
PST PDT
Sun Apr 26 02:00:00 GMT 1970 Sun Oct 25 01:00:00 GMT 1970
Sun Apr 25 02:00:00 GMT 1971 Sun Oct 31 01:00:00 GMT 1971
Sun Apr 30 02:00:00 GMT 1972 Sun Oct 29 01:00:00 GMT 1972
Sun Apr 29 02:00:00 GMT 1973 Sun Oct 28 01:00:00 GMT 1973
Sun Apr 28 02:00:00 GMT 1974 Sun Oct 27 01:00:00 GMT 1974
Should these not be taking place either seven or eight hours later
according to GMT? (I.e. 0200 PST, 0200 PDT) Am I misinterpreting the
values in the timezone files?
--lyndon
-------------- next part --------------
#include <u.h>
#include <libc.h>
#include <stdio.h>
struct tz {
int offset;
char zone[5];
};
static char EPARSE[] = "parse error";
void main (int argc, char **argv)
{
struct tz tz[2];
Tm *t;
long i[2];
int rc;
char *s;
rc = scanf("%s %d %s %d", &tz[0].zone, &tz[0].offset,
&tz[1].zone, &tz[1].offset);
if (rc == EOF || rc != 4) {
exits(EPARSE);
}
printf("%28s\t%28s\n", tz[0].zone, tz[1].zone);
for (;;) {
rc = scanf("%ld %ld", &i[0], &i[1]);
if (rc == EOF) {
exits(0);
}
if (rc != 2) {
exits(EPARSE);
}
t = gmtime(i[0]);
s = asctime(t);
s[28] = '\0';
printf("%s\t", s);
t = gmtime(i[1]);
s = asctime(t);
s[28] = '\0';
printf("%s\n", s);
}
exits(0);
}
next prev parent reply other threads:[~2011-03-27 20:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 21:46 Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-03-25 22:08 ` erik quanstrom
2011-03-25 22:53 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-03-26 3:38 ` erik quanstrom
2011-03-26 15:13 ` erik quanstrom
2011-03-27 20:48 ` Lyndon Nerenberg (VE6BBM/VE7TFX) [this message]
2011-03-27 21:13 ` erik quanstrom
2011-03-27 21:20 ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-03-27 22:31 ` Steve Simon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0063c64816641ec9e978b9223da09fcb@gandalf.orthanc.ca \
--to=lyndon@orthanc.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).