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_4.sh 815 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
21
22
23
24
25
26
27
28
29
  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. # Finally we use a custom epoch that uses days since 1969-07-21T02:56:00.
  7. # Hence the output should cover the first five 24-hour periods following
  8. # the historic Apollo 11 moon-landing; these 24-hour periods crosses
  9. # normal day boundaries:
  10. gmt sample1d -I0.5 << EOF > tt4.d
  11. 0 0
  12. 4 1
  13. EOF
  14. cat << EOF > tt4.answer
  15. 1969-07-21T02:56:00 0
  16. 1969-07-21T14:56:00 0.125
  17. 1969-07-22T02:56:00 0.25
  18. 1969-07-22T14:56:00 0.375
  19. 1969-07-23T02:56:00 0.5
  20. 1969-07-23T14:56:00 0.625
  21. 1969-07-24T02:56:00 0.75
  22. 1969-07-24T14:56:00 0.875
  23. 1969-07-25T02:56:00 1
  24. EOF
  25. gmt convert tt4.d -fi0t -fo0T --TIME_EPOCH=1969-07-21T02:56:00 --TIME_UNIT=d > tt4.result
  26. diff tt4.result tt4.answer --strip-trailing-cr > fail
Tip!

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

Comments

Loading...