Mandy Shaw writes:

>I am completely stumped by this.

>I have a bit of code that both I and one of my customers use for sending
>spool files to Domino as emails in a nicely formatted manner (using a MIME
>HTML part).

>It all works beautifully, except that the date that comes up on the email
is always 11 hours early!

>If I send an email into Domino using SNDDST this does not happen - but
>SNDDST won't do for this.

>Same problem on V5R1 (me) and V5R2 (customer) and in JDK 1.3 (me) and
>1.1.8 (customer). I also get the same problem when I run the same code on
>Linux (sending to a non-Domino destination). There appears to be nothing
>in the code that is making any attempt to set a date/time, and the log of
>the conversation with the SMTP server shows the correct date/time.

>It's definitely nothing to do with job dates.

>Has anyone else come up against this? I can attach the relevant bits of
>the code if necessary.

Mandy,

The fact that it's always exactly 11 hours early suggests a time zone
issue.

Use this to determine your current time zone :

TimeZone tz = TimeZone.getDefault();
// Default Time zone
System.out.println(tz.getDisplayName());
//Default + daylight saving - if any
System.out.println(tz.getDisplayName(true, TimeZone.LONG));

When I run this in the UK, I get:

Greenwich Mean Time
British Summer Time

If you don't get the correct values for your location, you need to add a
time zone entry to the SystemDefault.properties file. Otherwise, JVM will
default to UTC.

Cheers,

Keith













This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.