[jcifs] Quick dumb timezone question
Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Thu Sep 5 15:18:50 EST 2002
> -----Original Message-----
> From: Christopher R. Hertel [SMTP:crh at ubiqx.mn.org]
> Sent: Thursday, September 05, 2002 12:40 AM
> To: jcifs at samba.org
> Subject: [jcifs] Quick dumb timezone question
>
> I'm confused about the ServerTimeZone field in the NegProt response. I
> would have thought that it would have been a signed value, with positive
> values for east of Greenwich and negative values for west. The docs say
> it's signed, however.
>
Right. It's signed.
> How is this field used?
>
Well I have an app that searches a bunch of drives around the globe in
parallel for files. Here are some data points. You figure it out.
San Francisco 420
New York 240
Toronto 240
London -60
Hong Kong -480
Singapore -480
Tokyo -540
Melbourne -600
But this is not a quick dumb question. It's complicated. Actually the SNIA
doc has a bit more about how you take into account daylight savings time.
Look at writeTime() in ServerMessageBlock.java. But some regions use daylight
savings and some don't. If the server is in a different hemisphere and you're in
daylight savings, then wouldn't times need to be adjusted whereas with a server
in the same hemisphere you would not adjust? Currently I calculate daylight
savings correction for *the time being encoded* based on *my* timezone.
Doesn't the *servers* timezone need to be considered? Last I checked times
in different TZs work just fine but it would be great if you could answer these
questions definitively. I'm not crytal clear on it.
More information about the jcifs
mailing list