Local time, see man strftime to get more information about format
.TP
+\fBtztime\fR \fB(timezone) (format)\fR
+Local time for specified timezone, see man strftime to get more information about format. The timezone argument is specified in similar fashion as TZ environment variable. For hints, look in /usr/share/zoneinfo. e.g. US/Pacific, Europe/Zurich, etc.
+
+.TP
\fBtotaldown\fR \fBnet\fR
Total download, overflows at 4 GB on Linux with 32-bit arch and there doesn't seem to be a way to know how many times it has already done that before conky has started.
<varlistentry>
<term>
+ <command><option>utime</option></command>
+ <option>(format)</option>
+ </term>
+ <listitem>
+ Display time in UTC (universal coordinate time).
+ <para></para></listitem>
+</varlistentry>
+
+<varlistentry>
+ <term>
+ <command><option>tztime</option></command>
+ <option>(timezone) (format)</option>
+ </term>
+ <listitem>
+ Local time for specified timezone, see man strftime to get more information about format. The timezone argument is specified in similar fashion as TZ environment variable. For hints, look in /usr/share/zoneinfo. e.g. US/Pacific, Europe/Zurich, etc.
+ <para></para></listitem>
+</varlistentry>
+
+<varlistentry>
+ <term>
<command><option>totaldown</option></command>
<option>net</option>
</term>
OBJ_text,
OBJ_time,
OBJ_utime,
+ OBJ_tztime,
OBJ_totaldown,
OBJ_totalup,
OBJ_updates,
unsigned char loadavg[3];
unsigned int cpu_index;
struct mail_s *mail;
+
+ struct {
+ char *tz; /* timezone variable */
+ char *fmt; /* time display formatting */
+ } tztime;
+
struct {
struct fs_stat *fs;
int w, h;
free(objs[i].data.s);
break;
case OBJ_utime:
+ free(objs[i].data.s);
+ break;
+ case OBJ_tztime:
+ free(objs[i].data.tztime.tz);
+ free(objs[i].data.tztime.fmt);
+ break;
case OBJ_imap:
free(info.mail);
break;
obj->data.i2c.devtype);
END OBJ(time, 0) obj->data.s = strdup(arg ? arg : "%F %T");
END OBJ(utime, 0) obj->data.s = strdup(arg ? arg : "%F %T");
+ END OBJ(tztime, 0)
+ char buf1[256], buf2[256], *fmt, *tz;
+ fmt = tz = NULL;
+ if (arg) {
+ int nArgs = sscanf(arg, "%255s %255[^\n]", buf1, buf2);
+ switch (nArgs) {
+ case 2:
+ tz = buf1;
+ case 1:
+ fmt = buf2;
+ }
+ }
+
+ obj->data.tztime.fmt = strdup(fmt ? fmt : "%F %T");
+ obj->data.tztime.tz = tz ? strdup(tz) : NULL;
#ifdef HAVE_ICONV
END OBJ(iconv_start, 0)
if (iconv_converting) {
struct tm *tm = gmtime(&t);
strftime(p, p_max_size, obj->data.s, tm);
}
+ OBJ(tztime) {
+ char* oldTZ = NULL;
+ if (obj->data.tztime.tz) {
+ oldTZ = getenv("TZ");
+ setenv("TZ", obj->data.tztime.tz, 1);
+ tzset();
+ }
+ time_t t = time(NULL);
+ struct tm *tm = localtime(&t);
+ setlocale(LC_TIME, "");
+ strftime(p, p_max_size, obj->data.tztime.fmt, tm);
+ if (oldTZ) {
+ setenv("TZ", oldTZ, 1);
+ tzset();
+ } else {
+ unsetenv("TZ");
+ }
+ // Needless to free oldTZ since getenv gives ptr to static data
+ }
OBJ(totaldown) {
human_readable(obj->data.net->recv, p,
255);