Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F906922
date.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 30, 11:38 AM
Size
402 B
Mime Type
text/x-ruby
Expires
Mon, Sep 1, 11:38 AM (20 h, 4 m)
Engine
blob
Format
Raw Data
Handle
253713
Attached To
rWEBDNS WebDNS (edet4)
date.rb
View Options
module
Strategies
module
Date
module_function
def
generate_serial
(
current_serial
)
# Optimization for the case that current_serial is a lot larger
# than the generated serial
new
=
[
Time
.
now
.
strftime
(
'%Y%m%d00'
)
.
to_i
,
current_serial
].
max
# Increment until we find a spot
new
+=
1
while
new
<=
current_serial
new
end
end
end
Event Timeline
Log In to Comment