Tuesday, 15 June 2010

amazon ec2 - AWS ec2 time zone reflecting wrong in java app -



amazon ec2 - AWS ec2 time zone reflecting wrong in java app -

i running application on ec2 instance did configuration setting date , time zone , resulting me me ist desired. when running java application showing me time zone edt.

could please tell me why getting 2 different time zone in java application , date command in linux.

it's possible code somewhere calls timezone.setdefault. can seek calling passing different time zone, or passing null reset time zone system's default time zone.

it may need restart ec2 instance, default time zone read when jvm first started. if you've changed afterwards, won't see effect until restarting jvm.

in general though - it's not practice rely on time zone setting of operating system. consider explicitly setting time zones needed, or intentionally using timezone.setdefault in code.

java amazon-ec2 timezone

No comments:

Post a Comment