#22 closed task (fixed)
change pulse_time to DataAndTime type
Reported by: | zhangjr | Owned by: | tangm |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | component1 | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Parent ID: | Parent Tickets: | ||
Estimated Number of Hours: | 0.0 | Add Hours to Ticket: | 0 |
Billable?: | yes | Total Hours: | 0 |
Description
Subtickets
Child Tickets
Change History (7)
comment:1 Changed 9 years ago by zhangjr
comment:2 Changed 9 years ago by zhangjr
If the precision is nano-second, int64 (~18 decimal digits) is not enough. So the 100 ns is taken finally.
step 1: from UTC (local time +8) to unix timestamp (without timezone)
step 2: from float unix time to integer in 100ns, with bin [-50+i*100, 50+i*100)
As the data is loaded into Mantid, the epoch time has to been converted from 1970.1.1 to 1990.1.1.
comment:3 Changed 9 years ago by zhangjr
- Owner changed from somebody to tangm
- Status changed from new to assigned
comment:4 Changed 9 years ago by tangm
- Status changed from assigned to accepted
comment:5 Changed 9 years ago by tangm
Unix time is not suitable due to leap seconds. TAI and UTC datetime should be used in this case.
APIs for conversion between TAI and UTC are provided in CalendarTool class.
comment:6 Changed 9 years ago by tangm
- Resolution set to fixed
- Status changed from accepted to closed
comment:7 Changed 8 years ago by zhangjr
Note: See
TracTickets for help on using
tickets.
The time is in Unix tinestamp in nanosecond, with the epoch of January 1, 1970, 00:00:00 GMT. The local time in UTC is 1970-01-01 08:00:00+08:00.
see:
http://www.epochconverter.com/