[Solved] Access Real Time on Computer [duplicate]


import time

print time.strftime('%I:%M:%S %p %Z')

For me, prints 12:21:51 PM EDT

Edit: Just want to clarify the place holders.

%I = Hour (12-hour clock) as a decimal number [01,12].
%M = Minute as a decimal number [00,59].
%S = Second as a decimal number [00,61].
%p = Locale’s equivalent of either AM or PM.
%Z = Time zone name (no characters if no time zone exists).

solved Access Real Time on Computer [duplicate]