Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

math -T with time #4771

Closed
gd-a opened this issue Feb 8, 2021 · 3 comments
Closed

math -T with time #4771

gd-a opened this issue Feb 8, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@gd-a
Copy link
Contributor

gd-a commented Feb 8, 2021

gmt -v 6.2.0_bb0b2d9_2020.12.14 on macOS Big Sur

When trying to create a vector of timestamps (e.g 1 over 4 Jan 1st from 1980 to 2019)

gmt math -o0 -T1980-01-01T/2019-12-31T/4y T =
00T00:00:00.000000000
00T00:00:00.000000000
00T00:00:00.000000000
00T00:00:00.000000000
00T00:00:00.000000000
00T00:00:00.000000000
00T00:00:00.000000000
00T00:00:00.000000000
00T00:00:00.000000000
00T00:00:00.000000000

However the incd version works :

gmt math -o0 -T1980-01-01T/2019-12-31T/1461d T =
1980-01-01T00:00:00
1984-01-01T00:00:00
1988-01-01T00:00:00
1992-01-01T00:00:00
1996-01-01T00:00:00
2000-01-01T00:00:00
2004-01-01T00:00:00
2008-01-01T00:00:00
2012-01-01T00:00:00
2016-01-01T00:00:00

After some tests, it seems that only d is properly working.
w acts like seconds
o and y have the output bug

Thanks :)

@gd-a gd-a added the bug Something isn't working label Feb 8, 2021
@maxrjones
Copy link
Member

This bug was introduced by this merge commit (PR: #4409). I'll take a look and will ping for help if needed.

@maxrjones
Copy link
Member

Fixed by #4778

@maxrjones
Copy link
Member

w acts like seconds

Turns out weeks isn't supported, #4778 updates the documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants