diff options
Diffstat (limited to 'DateMeter.c')
-rw-r--r-- | DateMeter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/DateMeter.c b/DateMeter.c index ac653b62..e7fe1a67 100644 --- a/DateMeter.c +++ b/DateMeter.c @@ -20,9 +20,10 @@ static const int DateMeter_attributes[] = { }; static void DateMeter_updateValues(Meter* this) { - time_t t = time(NULL); + const ProcessList* pl = this->pl; + struct tm result; - const struct tm* lt = localtime_r(&t, &result); + const struct tm* lt = localtime_r(&pl->timestamp.tv_sec, &result); this->values[0] = lt->tm_yday; int year = lt->tm_year + 1900; if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) { |