Skip to content

Commit

Permalink
libs/toolsa/DateTime class - adding setToZero()
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dixon committed Oct 5, 2024
1 parent aad1c2d commit c451ec8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions codebase/libs/toolsa/src/include/toolsa/DateTime.hh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public:

void setToNever(); // sets to invalid

void setToZero(); // sets to 0 = 1970/01/01_00:00:00

void set(time_t when);

void set(time_t when, double subSec);
Expand Down
8 changes: 8 additions & 0 deletions codebase/libs/toolsa/src/utim/DateTime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,14 @@ void
set(NEVER);
}

void
DateTime::setToZero()
{
_uTime = 0;
_subSec = 0;
setLeadDeltaTime(NULL);
}

void
DateTime::set(time_t when)
{
Expand Down

0 comments on commit c451ec8

Please sign in to comment.