Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AossTower
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
AossTower
Commits
4473c12e
Verified
Commit
4473c12e
authored
7 years ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Fix handling of midnight on loggernet rotate
parent
e1a083a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/loggernet_rotate.sh
+3
-2
3 additions, 2 deletions
scripts/loggernet_rotate.sh
with
3 additions
and
2 deletions
scripts/loggernet_rotate.sh
+
3
−
2
View file @
4473c12e
...
@@ -49,13 +49,14 @@ EOF
...
@@ -49,13 +49,14 @@ EOF
#}
#}
# completes almost every feature of the below for loops
# completes almost every feature of the below for loops
# TODO: if file doesn't exist add the header
# specially handles 2400 which should go for the next day, not the past day
# TODO: Handle output file suffix
yyyy_jjj_tower_split
()
{
yyyy_jjj_tower_split
()
{
awk_command
=
'
awk_command
=
'
NR>header_size {
NR>header_size {
time_spec = sprintf("%04d 01 %03d 00 00 00", $2, $3);
time_spec = sprintf("%04d 01 %03d 00 00 00", $2, $3);
epoch_seconds = mktime(time_spec);
epoch_seconds = mktime(time_spec);
if ($4 == "2400")
epoch_seconds = epoch_seconds + 86400;
file_date = strftime("%Y-%m-%d", epoch_seconds);
file_date = strftime("%Y-%m-%d", epoch_seconds);
jday = strftime("%j", epoch_seconds);
jday = strftime("%j", epoch_seconds);
y = strftime("%Y", epoch_seconds);
y = strftime("%Y", epoch_seconds);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment