Software Development

Java 8 – Get my current timezone using ZonedDateTime

This post shows how to get your current timezone in Java using ZonedDateTime class.

Get Current Timezone Using ZonedDateTime

Since Java 8, it is possible to determine your current timezone using ZoneDateTime. Suppose you are in Singapore or thereabout; the following codes display your current time zone.

When we run the codes, we get the following output.



Got comments or suggestions? We disabled the comments on this site to fight off spammers, but you can still contact us via our Facebook page!.

You Might Also Like