[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #11144(accepted unknown)

Opened 5 months ago

Last modified 5 months ago

Unix timestamp support

Reported by: endermoneymod@… Owned by: Future
Component: datetime Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:
Xref:

Description

I'm one of the many people who use unix timestamps in real-life. It would be highly appreciated to be able to specify those in CLDR datetime formats.

An unix timestamp looks like: "1527637564"

An IRC message with an unix timestamp looks like: "[1527637595] <Soni> hello"

Attachments

Change History

comment:1 in reply to: ↑ description Changed 5 months ago by srl

Replying to endermoneymod@…:

I'm one of the many people who use unix timestamps in real-life. It would be highly appreciated to be able to specify those in CLDR datetime formats.
An unix timestamp looks like: "1527637564"

the format pattern g.A will give julian day + fractional seconds, for example https://ssl.icu-project.org/icu-bin/locexp?_=fr&d_=en&x=dat&str=g.A gives 2458268.62281766 as of this writing.

Perhaps the CLDR formats could have a format character which formats to epoch time ( seconds or millis since Jan 1 1970)?

comment:2 Changed 5 months ago by emmons

  • Owner changed from anybody to Future
  • Status changed from new to accepted

comment:3 Changed 5 months ago by srl

Seem to be 3 options:

  • 1527637564 (seconds since epoch )
  • 1527637564.000 / 1527637564.987 (seconds since epoch, with fractions
  • 1527637564000 / 1527637564987 ( millliseconds since epoch)
View

Add a comment

Modify Ticket

Action
as accepted
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.