Bug #1131
[5.4.2] gmt set not honoring TIME_SYSTEM argument
Status: | Closed | Start date: | 2017-07-13 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | - | |||
Target version: | Candidate for next bugfix release | |||
Affected version: | other | Platform: | Linux |
Description
The documentation for TIME_SYSTEM
specifies "This parameter is not stored in the gmt.conf file but is translated to the respective values of TIME_EPOCH
and TIME_UNIT
". The following MWE shows that this is not happening in GMT 5.4.2
gmt set FONT_ANNOT_PRIMARY=12p TIME_SYSTEM=MJD
Inspection of the generated gmt.conf
shows that FONT_ANNOT_PRIMARY
has been set, but TIME_EPOCH
and TIME_UNIT
have not.
# # GMT 5.4.2 Defaults file # # FONT Parameters # FONT_ANNOT_PRIMARY = 12p,Helvetica,black
Setting TIME_EPOCH
and TIME_UNIT
manually results in them being written to gmt.conf
.
gmt set FONT_ANNOT_PRIMARY=12p TIME_SYSTEM=MJD TIME_EPOCH=1858-11-17T00:00:00 TIME_UNIT=d
# # GMT 5.4.2 Defaults file # # FONT Parameters # FONT_ANNOT_PRIMARY = 12p,Helvetica,black # # Calendar/Time Parameters # TIME_EPOCH = 1858-11-17T00:00:00 TIME_UNIT = d
I have another machine accessible with gmt 5.3.1, this was still working on that version. It was already broken on 5.4.1.
History
#1
Updated by Remko over 3 years ago
I can duplicate this bug, Also in the SVN version (5.4.3).
Note: it only applies when you do not already have TIME_UNIT and TIME_EPOCH in a local gmt.conf or ~/.gmt/gmt.conf
This also applies to some other settings that translate to multiple settings like FONT, FONT_ANNOT.
#2
Updated by Remko over 3 years ago
- Assignee set to Remko
- % Done changed from 0 to 30
- Straight conversions when using GMT4 compatibility (e.g. LABEL_FONT to FONT_LABEL)
- GMT4-compatible conversions that require a bit more work (e.g. ANNOT_FONT_SIZE_PRIMARY to FONT_ANNOT_PRIMARY)
- Shorthands line TIME_SYSTEM that needs translation to TIME_UNIT and TIME_EPOCH
Each of these currently fails. I'm fixing this step by step.
#3
Updated by Remko over 3 years ago
- Status changed from New to Resolved
- Target version set to Candidate for next bugfix release
- % Done changed from 30 to 100
The fix is in. Both in branch and trunk.
#4
Updated by Matthias over 3 years ago
Thanks a lot for the quick fix, your effort is sincerely appreciated!