commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: [commons-net] listFiles failing to parse Apr 26 02:45 like dates
Date Thu, 27 Apr 2006 22:44:00 GMT
David Waitzman wrote:
> The fix I made was to force the FTP timezone to be UTC using:
>    FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_UNIX);
>    conf.setServerTimeZoneId("UTC");
>    ftpClient.configure(conf);
> The UTC timezone has no daylight savings time so all the times are valid.
> I'd rather keep my default timezone but turn off daylight savings time 
> transitions, but I don't know how to do that.  (Any suggestions?)

The only way to turn off time zone transitions is to:
a) pick either summer or winter time (usually the one without daylight 
savings)
b) find out the offset
c) use the offset as a fixed offset, eg 'GMT+02:00'
Of course the time will only be accurate half the year...

Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message