Actions
Feature #10544
closedTime#to_i(:millisecond)
Feature #10544:
Time#to_i(:millisecond)
Status:
Rejected
Assignee:
-
Target version:
-
Description
Files
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
- Description updated (diff)
Do you need unix time in milliseconds so often?
Updated by Glass_saga (Masaki Matsushita) over 11 years ago
I want this feature to give unix time to other languages like JavaScript.
Some languages expect unix time in milliseconds.
Updated by david_macmahon (David MacMahon) over 11 years ago
How about a more general Time#to_i(scale=1)?
Examples:
- Passing
1forscale(or passing nothing) would return seconds. - Passing
1000forscalewould return milliseconds. - Passing
1/60rfor scale would return minutes.
Masaki Matsushita wrote:
IMHO, it is generally preferable to avoid time travel by truncating to the beginning of the "present" millisecond rather than possibly rounding to the beginning of the "future" millisecond.
Updated by akr (Akira Tanaka) over 9 years ago
Actions