Skip to content

Tag: utc

Getting the UTC timestamp in Java

An old Stack Overflow posting suggests that the way to get the UTC timestamp in Java is the following: Unfortunately this does not work for me. I have a very simple program (reproduced below) which demonstrates different behavior. On Windows: the time is the local time and it is labeled with the offset with GMT On Linux: the time is