pastebin
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
pastebin
Follow @pastebin
create new paste
trending pastes
sign up
login
my settings
my profile
My Pastes
Public Pastes
Untitled
1 sec ago
connect
21 sec ago
Untitled
8 sec ago
Untitled
19 sec ago
Untitled
14 sec ago
Untitled
20 sec ago
Untitled
22 sec ago
Untitled
27 sec ago
Layout Width
Share Pastebin
Untitled
By: a guest | Feb 9th, 2010 | Syntax:
Python
| Size: 0.15 KB | Hits: 25 | Expires: Never
Download
|
Raw
|
Embed
|
Report abuse
This paste has a previous version,
view the difference
.
import
time
local_time =
time
.
localtime
(
time
.
time
(
)
)
s =
time
.
strftime
(
"%a %d %b, %Y %H:%M:%S (%Z)"
, local_time
)
print
(
s
)
print
(
s.
encode
(
'utf-8'
)
)
create new paste
|
create new version of this paste
RAW Paste Data
import time local_time = time.localtime(time.time()) s = time.strftime("%a %d %b, %Y %H:%M:%S (%Z)", local_time) print(s) print(s.encode('utf-8'))