For my centralized logging purposes for an application that will be used over the network(no server side application involved, yet) I am required to also store the time at which a particular event occurs. The task is pretty much easy but the problem is, as I have noticed, the computers over the network don't have their time setup accurately. Therefore in order to standardize the time I choose to grab it from the NAS using net time \\nas
. All's good to this point.
Now the problem is, the format in which net time
returns the time is dependent on the the particular system's datetime format, on which the application is run, which is guaranteed to be consistent, and therefore rendering a hard coded dateformat conversion to timestamp useless. Any solutions and opinions?
Can't use this solution since I am coding in python.