cirocosta / fssim

Mozilla Public License 2.0
0 stars 1 forks source link

Utilities - 1 #7

Closed cirocosta closed 8 years ago

cirocosta commented 8 years ago

tests are failing because travis' machine is not agreeing with mine in respect to epoch's 0 :(

/home/travis/build/cirocosta/fssim/tests/test-file_utils.c: 105

Assertion `!strcmp(expected, buf)` failed

    1969-12-31 21:00 != 1970-01-01 00:00

that's a difference of 3 hours ... might be something regarding to UTC

cirocosta commented 8 years ago

yep, simple fix. From man(3) ctime:

The localtime() function converts the calendar time timep to broken-down time representation, expressed relative to the user's specified timezone. The function acts as if it called tzset(3) and sets the external variables tzname with information about the current timezone, timezone with the difference between Coordinated Universal Time (UTC) and local standard time in seconds, and daylight to a nonzero value if daylight savings time rules apply during some part of the year

So, setting TZ env variable in travis to the same on my machine did the job.

cirocosta commented 8 years ago

Even though we start a pseudo cp routine, we'll need another persistence iteration first