Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get time with different timezone #115

Open
ZakariaJawas opened this issue Mar 17, 2019 · 2 comments
Open

How to get time with different timezone #115

ZakariaJawas opened this issue Mar 17, 2019 · 2 comments

Comments

@ZakariaJawas
Copy link

Is it possible to force TrueTime to get time in a different timezone the phone is configured with

@SuvabBaral
Copy link

I too am looking for this. Basically was looking for a way to supply a timezone to the TrueTime library so that even if the device time/timezone is changed, we can still get the correct time in the desired timezone.

@kaushikgopal , any thoughts on it?

@harshmauryaa
Copy link

Its too late, but if you are using Java 8 and above you can follow this link - https://mkyong.com/java/java-convert-date-and-time-between-timezone

Note
The java.util.Date has no concept of time zone, and only represents the number of seconds passed since the Unix epoch time – 1970-01-01T00:00:00Z. But, if you print the Date object directly, the Date object will be always printed with the default system time zone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants