Python


#1

my question is how to get time and date from timezone wise like i am from India i want to get Indian time(IST) through method, as we get current time by now method.
for example i don’t know japan time at the moment then how to get japan time through any method ?


#2

You can get your computer’s time.
For anything else you need information about how that other time relates to yours.
For one or a few other timezones, if you know how they relate to yours and you’re confident that this won’t change, you could add that in your code.
For many you’ll want to obtain that information regularly from somebody who publishes it. Timezones change. You would have to think about how often you’d want to update this and how much tolerance for error you have.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.