On Tue, 21 Aug 2007 10:20:42 +0200, "Marc Mendez"
<> wrote, quoted or indirectly quoted
someone who said :
>long lastmodified = file.lastModified();
>long currentTime = new GregorianCalendar().getTimeInMillis();
I would do it like this:
long currentTime = System..currentTimeMillis();
long filetime = file.lastModified();
static final SimpleDateFormat sdf =
new SimpleDateFormat( "EEEE yyyy/MM/dd hh:mm:ss aa zz :
zzzzzz" );
String dateString = sdf.format( new Date( filetime ) );
This way you see the time zone being used. Most often problems with
date/time are displaying in a different time zone, DST than you
thought you were.
Also check how both machines are configured in the OS.
See
http://mindprod.com/applet/tz.html
see
http://mindprod.com/jgloss/timezone.html
http://mindprod.com/jgloss/calendar.html
http://mindprod.com/jgloss/time.html
http://mindprod.com/jgloss/timestamp.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com