Any tips? How can we use&show local times and letters in C9



Any tips? for python: I want to use and have results in local time and the letters.
Cloud9 is bit limited service to use other languages/command (example: Japan…),
-If there are some tips, it will be so comfortably useful.
-the code for a local language doesn’t work…

I input the following..only UTC time is showed up..

import datetime

today’s date

print todaydetail.hour
print todaydetail.minute



The default timezone in all workspaces is UTC. if you’re using python, the built in datetime lib is rather annoying for timezones.

try using pytz:


from datetime import datetime
from pytz import timezone

japan = timezone('Japan')

utc_time =
japan_time = japan(utc_time)

That will return japan_time as a datetime object with the correct timezones set. Doing this with the datetime library directly is easily 3-4x more code.


Thanks with that ref link〜

I tried Japan time zone with the reference codes.

I tried in some ways, but it didn’t work japan = timezone(‘Japan’) japan_time=today.

The following error showed up…


I tried in some ways, but the following error shows up…

from pytz import timezone
importError: No module named pytz