15 lines
301 B
Python
15 lines
301 B
Python
from datetime import datetime
|
|
from pytz import timezone
|
|
|
|
if __name__ == "__main__":
|
|
d = datetime(2012, 12, 21, 9, 30, 0)
|
|
print(d)
|
|
|
|
central = timezone('US/Central')
|
|
loc_d = central.localize(d)
|
|
print(loc_d)
|
|
|
|
bang_d = loc_d.astimezone(timezone("Asia/Kolkata"))
|
|
print(bang_d)
|
|
|