You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@logging.apache.org by "Mr. Phuoc H Nguyen" <ph...@ssp.com.vn> on 2005/07/15 08:51:52 UTC
Timestamp vs Systemtime
Can anybody tell me why log4j's timestampe is different from system time?
Thanks
Huu Phuoc
---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0528-4, 07/14/2005
Tested on: 7/15/2005 1:51:58 PM
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com
Re: Timestamp vs Systemtime
Posted by "Mr. Phuoc H Nguyen" <ph...@ssp.com.vn>.
Niclas Hedhman wrote:
>
>In my RH9 /etc/sysconfig/clock I have Asia/Kuala_Lumpur,
>
Because you are in Malaysia. I am in Vietnam.
> so I guess you just add that to the file,
>
I use the tool in Redhat (setup tool) to modify the timezone, I didn't
add it manualy.
> and you should get things right.
>
>
>
I think I must use vi_VN locale.
>Cheers
>Niclas
>
>
>
Thanks,
Huu Phuoc
---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0528-4, 07/14/2005
Tested on: 7/15/2005 5:52:27 PM
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com
Re: Timestamp vs Systemtime
Posted by Niclas Hedhman <ni...@hedhman.org>.
On Friday 15 July 2005 18:30, Mr. Phuoc H Nguyen wrote:
> My timezone is "Asia/Saigon".
> I use RH9. In the file /etc/systconfig/clock I can find that information.
> But locale is en_US.
> So the difference is 14 hours.
> Yeah. It is right!
> I thanks for your help.
In my RH9 /etc/sysconfig/clock I have Asia/Kuala_Lumpur, so I guess you just
add that to the file, and you should get things right.
Cheers
Niclas
Re: Timestamp vs Systemtime
Posted by "Mr. Phuoc H Nguyen" <ph...@ssp.com.vn>.
My timezone is "Asia/Saigon".
I use RH9. In the file /etc/systconfig/clock I can find that information.
But locale is en_US.
So the difference is 14 hours.
Yeah. It is right!
I thanks for your help.
Huu Phuoc
Niclas Hedhman wrote:
> Probably a TimeZone issue.
>
>If you are on Linux,
>
> * verify with "date" from commandline that the time is right, and the
>timezone printed out correspond with reality.
>
> * verify that /etc/timezone contains a correct entry. (also found on
>/etc/systconfig/clock on RH9)
>
>If that is still right, then do in Java,
>
> Locale loc = Locale.getDefault();
> System.our.println( loc.toString() );
>
>If that doesn't correspond to what you expect, then try set the environment
>variable TZ to your time.
>
>On WIndows --> No clue.
>
>
>Cheers
>Niclas
>
>
>
---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0528-4, 07/14/2005
Tested on: 7/15/2005 5:30:11 PM
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com
Re: Timestamp vs Systemtime
Posted by Niclas Hedhman <ni...@hedhman.org>.
On Friday 15 July 2005 14:51, Mr. Phuoc H Nguyen wrote:
> Can anybody tell me why log4j's timestampe is different from system time?
Probably a TimeZone issue.
If you are on Linux,
* verify with "date" from commandline that the time is right, and the
timezone printed out correspond with reality.
* verify that /etc/timezone contains a correct entry. (also found on
/etc/systconfig/clock on RH9)
If that is still right, then do in Java,
Locale loc = Locale.getDefault();
System.our.println( loc.toString() );
If that doesn't correspond to what you expect, then try set the environment
variable TZ to your time.
On WIndows --> No clue.
Cheers
Niclas