![]() |
llrnet Server Date/Time stamps in logs
Ok, we need to make a decision on how we want the date and time formats to be shown forever in the llrnet results.txt files, AND, instructions on exactly how to make it that way for both Linux and Windows servers.
Default in llrserver-config.txt we have [Sat Mar 1 06:51:02 2008] With a slight modification to the config file In Linux we have [08/11/2008 07:16:36 AM] [08/11/2008 12:00:06 PM] In Windows we have [09/16/08 13:10:35] Someone sent me an awk script to change the time format from 12 hour to 24 hour, when I changed the llrnet server from Windows to Linux. What we need is a consistent agreed upon date / time stamp format so we can convert to .csv files with the least amount of effort and to reduce errors for importing the data into the database. I personally don't care what it's going to be, just so long as we decide on and agree on the format we will be using from here on out. I believe the below would be the best and easiest to work with and time conversion is a snap if need be. [B][yyyy/mm/dd 24hr time][/B] Windows uses the last two yy, but that's easy enough to add in the first two yy. So what say ye all? |
I make the above format as part of the filenames so it's easier to sort by date/time
|
[quote=IronBits;149061]I make the above format as part of the filenames so it's easier to sort by date/time[/quote]
I completely agree with using the yyyy/mm/dd format on both the results and in the results file names. Karsten and I have gone to that as a more standard date format for reservation and status dates on our k<300 and CRUS web pages. This format works best in the file name for keeping them in correct date order. |
agree too.
all dates on [url]www.rieselprime.org[/url] are changed to this format YYYY/MM/DD. for my personal verification tools for the drive stats pages i used an awk-script that can handle different formats depending on it (Adam's server got ohters than David's,...) a unique format for all resultfiles would be best! |
[URL="http://www.cl.cam.ac.uk/%7Emgk25/iso-time.html"]http://www.cl.cam.ac.uk/~mgk25/iso-time.html[/URL]
The international ISO standard is "YYYY-MM-DD HH:MM:SS" (24 hour) e.g. 2008-09-16 13:10:35 I think that should be used to avoid confusion about whether it's YYYY/MM/DD or YYYY/DD/MM. If it looks like the ISO standard, people are more likely to know it's YYYY-MM-DD instead of any other variation (at least, if people know about the ISO standard...even if they don't, I think it's better than something separated by slashes, which are used in many different ways). |
Well heck, if it's an ISO standard
YYYY-MM-DD HH:MM:SS" (24 hour) it is! :smile: Now, does anyone know how to tweak what file so llrnet Server will output that by default? For both Linux and Windows and any other flavors that might be out there? Then we can create new Section 'Everything you need to know to run an LLRNET Server' and make it a sticky so we don't lose it... :rolleyes: Then we can provide all the links to the Server software, a corrected config files they need to use so they are ISO compliant and all the Scripts we use to generate web pages, stats and .csv files etc. One stop shopping for Servers :wink: |
[quote=IronBits;149117]Well heck, if it's an ISO standard
YYYY-MM-DD HH:MM:SS" (24 hour) it is! :smile: Now, does anyone know how to tweak what file so llrnet Server will output that by default? For both Linux and Windows and any other flavors that might be out there? Then we can create new Section 'Everything you need to know to run an LLRNET Server' and make it a sticky so we don't lose it... :rolleyes: Then we can provide all the links to the Server software, a corrected config files they need to use so they are ISO compliant and all the Scripts we use to generate web pages, stats and .csv files etc. One stop shopping for Servers :wink:[/quote] Hmm...well, the way we've got the servers' llr-serverconfig.txt's fixed right now is: [I]function DisplayDate() return date("%d/%m/%Y\ %r") end[/I] Presumably, to have them output in ISO format, we'd have to change the date string to: [I]return date("%d-%m-%Y\ %r")[/I] Of course, we'd still have to do some minor conversions in the scripts that generate the CSV files--namely, converting the two-digit year in the Windows "ISO-ish" format to four-digit, and converting the 12-hour time in the Linux one to 24-hour time, thus making our CSV times fully ISO compatible. :smile: |
[quote=mdettweiler;149143][I]return date("%d-%m-%Y\ %r")[/I][/quote]
I think you mean [code]return date("%F\ %R")[/code]:wink: [url]http://astrostatistics.psu.edu/datasets/2006tutorial/html/base/html/strptime.html[/url] %F is equiv. to %Y-%m-%d, the ISO standard (note Y-m-d, not d-m-Y as you entered), and %R is 24 hour time. |
[quote=Mini-Geek;149146]I think you mean
[code]return date("%Y-%m-%d\ %r")[/code]:wink:[/quote] Oops, yeah that's what I meant. Thanks. :smile: |
Max, give
return date("%F\ %R") a try, let me know how that works out! If that works out as it sounds like it should, then we won't have to convert date/time anymore :D Does that work for both Linux and Windows Mini-Geek ??? and I'm going to assume it has to be in CAPS correct??? :smile: |
[quote=IronBits;149199]Max, give
return date("%F\ %R") a try, let me know how that works out! If that works out as it sounds like it should, then we won't have to convert date/time anymore :D Does that work for both Linux and Windows Mini-Geek ??? and I'm going to assume it has to be in CAPS correct??? :smile:[/quote] Okay, I've changed the llr-serverconfig.txt file, now I've just got to wait for a result to come in to check it. :smile: (I've got one client working steadily on G4000, so I imagine something should come in with the next 5-10 minutes.) |
| All times are UTC. The time now is 11:23. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.