Skip to content
Snippets Groups Projects
Verified Commit 4473c12e authored by David Hoese's avatar David Hoese
Browse files

Fix handling of midnight on loggernet rotate

parent e1a083a7
No related branches found
No related tags found
No related merge requests found
...@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment