Danny,

I'm looking at this fix for the daily savings problem, and you check
TimeZone.getDefault().inDaylightTime(new Date()).  Don't you want to use the
date that was passed instead of new Date(), or am I missing how this should
work?

Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "Danny Angus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 19, 2001 10:26 AM
Subject: Daylight saving bug


> I've looked over the daylight saving time issue, I found myself having the
> same error, and it seems to result from servers using daylight saving
time,
> I thought it might result from servers *not* using daylight saving, but a
> raw GMT offset.
>
> Anyway when I set my server up to use BST (not GMT+0) I got :
>
> 220 linux.killerbees.co.uk SMTP Server (JAMES SMTP Server 1.3-dev) ready
> Wed, 19 Sep 2001 15:01:58 +0000
>
> from the smtp login
> I expected:
> 220 linux.killerbees.co.uk SMTP Server (JAMES SMTP Server 1.3-dev) ready
> Wed, 19 Sep 2001 15:01:58 +0100
>
> So I looked and found that ..
> org.apache.james.util.RFC822DateFormat java.util.timeZone.getRawOffset()
is
> used to get the timezone offset, but this *doesn't* return an offset
> containing the daylight savings adjustment..
>
> So I've modified it, it seems to work for me so I've append the diff
below,
> what this does is add 1hr if daylight saving is used, and in force now.
>
> Index: RFC822DateFormat.java
> ===================================================================
> RCS file:
>
/home/cvspublic/jakarta-james/src/java/org/apache/james/util/RFC822DateForma
> t.java,v
> retrieving revision 1.1
> diff -r1.1 RFC822DateFormat.java
> 48a49,52
> >
> >
>
if((TimeZone.getDefault().useDaylightTime())&&(TimeZone.getDefault().inDayli
> ghtTime(new Date()))){
> >             min +=60;
> >         }
>
>
> attached is the whole source file.
>
> danny.
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to