Results 1 to 2 of 2
  1. #1
    johnmerlino is offline Member
    Join Date
    May 2014
    Posts
    56
    Rep Power
    0

    Default Is there any way to represent UTC time in Java 8's java.time package?

    Is there any way to represent UTC time in Java 8's java.time package? The classes in java.time like LocalDateTime and LocalTime give an offset from UTC. But I need actual UTC time representation. I don't want to use the deprecated Calendar or Date class because they are discouraged and difficult to work with. So I am just looking for a simple example of printing out utc time using java.time.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,038
    Rep Power
    10

    Default Re: Is there any way to represent UTC time in Java 8's java.time package?

    Look into ZonedDateTime: ZonedDateTime (Java Platform SE 8 )
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Replies: 5
    Last Post: 02-29-2012, 11:07 AM
  2. Replies: 3
    Last Post: 12-07-2011, 08:00 AM
  3. Replies: 3
    Last Post: 08-23-2011, 01:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •