Closed nexx512 closed 5 years ago
Changed to ISO format. For now the timezones are ignored though.
Are there any chances that this can make it into master? If not, what needs to be changed to meet you coding guidelines?
pls apply this PR :)
Could you sort out the build problems for the Cygwin build of your pull request?
Maybe it is as simple as doing
#ifdef __CYGWIN__
#define __tm_gmtoff tm_gmtoff
#define __tm_zone tm_zone
#endif
But please check before doing so. I only guessed this from the Appveyor error log.
I implemented
setSystemTime
using thestrptime
date string parser. This parser is part of the posix standard but requires the_XOPEN_SOURCE
to be defined. This leads to issues withbzero
and and some other deprecated functions. I decided to remove deprecated functions and turn back to standard ANSI-C functions.I also chose to use another format for the getSystemTime command. This might have an impact to already existing applications. But I would consider command symmetry for getSystemTime and setSystemTime more important. I also would prefer an output of getSystemTime that is system locale specific and can be parsed by
strptime
. I thought about useind ISO date formats but that would cause problemd encoding the weekdays. So I stuck tostrftime "%c"
.