[gnome-color-manager] trivial: Search for epoch values for the huey address map
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: Search for epoch values for the huey address map
- Date: Sun, 1 Aug 2010 17:32:21 +0000 (UTC)
commit 4cfc1b4198e1efac08e1530b49f52448e8a0acf9
Author: Richard Hughes <richard hughsie com>
Date: Sun Aug 1 16:59:15 2010 +0100
trivial: Search for epoch values for the huey address map
docs/huey/gcm-dump-to-values.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/docs/huey/gcm-dump-to-values.c b/docs/huey/gcm-dump-to-values.c
index f5af1c3..503be86 100644
--- a/docs/huey/gcm-dump-to-values.c
+++ b/docs/huey/gcm-dump-to-values.c
@@ -84,6 +84,27 @@ main (gint argc, gchar *argv[])
g_print ("0x%02x\t%f\n", i, *value_float);
}
}
+ g_print ("*** find time/dates ***\n");
+ for (i=0; i<0xff-3; i++) {
+ GDate *date;
+ time_t *time_tmp;
+ gchar text[128];
+ time_tmp = (time_t *) (buffer+i);
+ date = g_date_new ();
+ g_date_set_time_t (date, *time_tmp);
+ if (!g_date_valid(date))
+ continue;
+ if (date->year == 1970)
+ continue;
+ if (date->year > 2011)
+ continue;
+ if (date->year < 1999)
+ continue;
+ g_date_strftime (text, 128, "%F", date);
+ g_print ("0x%02x\t%s\n", i, text);
+ g_date_free (date);
+ }
+
out:
g_strfreev (lines);
g_free (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]