Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

time_testing_1.sh 764 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  1. #!/usr/bin/env bash
  2. #
  3. #
  4. # This script runs some simple test to verify the that new time scheme
  5. # has been implemented successfully
  6. # Test 1:
  7. # Get the epochs (which now decodes to a rata die number and a day fraction
  8. # which is 0.0 unless the epoch occurs during a day) from gmt_time_system.h
  9. # and convert to relative time using the new TIME_SYSTEM rata. The values
  10. # should match the new rata die + day fraction for each epoch.
  11. ( gmt convert --TIME_SYSTEM=rata -fi0T -fo0t --FORMAT_FLOAT_OUT=%.12g | grep -v ">" | $AWK '{if ($1 != $2) print $0}' > fail ) <<%
  12. 2000-01-01T12:00:00 730120.5
  13. -4713-11-25T12:00:00 -1721423.5
  14. 1858-11-17T00:00:00 678576.0
  15. 1985-01-01T00:00:00 724642.0
  16. 1970-01-01T00:00:00 719163.0
  17. 0001-01-01T00:00:00 1.0
  18. %
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...