summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/recorder/recording.c2
-rw-r--r--firmware/common/timefuncs.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index adcea752d4..ade7e5146f 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -143,7 +143,7 @@ static char *create_filename(void)
143 143
144 /* Create a filename: RYYMMDDHHMMSS.mp3 */ 144 /* Create a filename: RYYMMDDHHMMSS.mp3 */
145 snprintf(fname, 32, "/R%02d%02d%02d%02d%02d%02d.mp3", 145 snprintf(fname, 32, "/R%02d%02d%02d%02d%02d%02d.mp3",
146 tm->tm_year%100, tm->tm_mon, tm->tm_mday, 146 tm->tm_year%100, tm->tm_mon+1, tm->tm_mday,
147 tm->tm_hour, tm->tm_min, tm->tm_sec); 147 tm->tm_hour, tm->tm_min, tm->tm_sec);
148 148
149 DEBUGF("Filename: %s\n", fname); 149 DEBUGF("Filename: %s\n", fname);
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c
index 913f85f8e1..23444e2e43 100644
--- a/firmware/common/timefuncs.c
+++ b/firmware/common/timefuncs.c
@@ -38,7 +38,7 @@ struct tm *get_time(void)
38 tm.tm_min = ((rtcbuf[2] & 0x70) >> 4) * 10 + (rtcbuf[2] & 0x0f); 38 tm.tm_min = ((rtcbuf[2] & 0x70) >> 4) * 10 + (rtcbuf[2] & 0x0f);
39 tm.tm_hour = ((rtcbuf[3] & 0x30) >> 4) * 10 + (rtcbuf[3] & 0x0f); 39 tm.tm_hour = ((rtcbuf[3] & 0x30) >> 4) * 10 + (rtcbuf[3] & 0x0f);
40 tm.tm_mday = ((rtcbuf[5] & 0x30) >> 4) * 10 + (rtcbuf[5] & 0x0f); 40 tm.tm_mday = ((rtcbuf[5] & 0x30) >> 4) * 10 + (rtcbuf[5] & 0x0f);
41 tm.tm_mon = ((rtcbuf[6] & 0x10) >> 4) * 10 + (rtcbuf[6] & 0x0f); 41 tm.tm_mon = ((rtcbuf[6] & 0x10) >> 4) * 10 + (rtcbuf[6] & 0x0f) - 1;
42 tm.tm_year = ((rtcbuf[7] & 0xf0) >> 4) * 10 + (rtcbuf[7] & 0x0f) + 100; 42 tm.tm_year = ((rtcbuf[7] & 0xf0) >> 4) * 10 + (rtcbuf[7] & 0x0f) + 100;
43 tm.tm_wday = rtcbuf[4] & 0x07; 43 tm.tm_wday = rtcbuf[4] & 0x07;
44 tm.tm_yday = 0; /* Not implemented for now */ 44 tm.tm_yday = 0; /* Not implemented for now */
@@ -48,8 +48,8 @@ struct tm *get_time(void)
48 tm.tm_min = 0; 48 tm.tm_min = 0;
49 tm.tm_hour = 0; 49 tm.tm_hour = 0;
50 tm.tm_mday = 1; 50 tm.tm_mday = 1;
51 tm.tm_mon = 1; 51 tm.tm_mon = 0;
52 tm.tm_year = 1970; 52 tm.tm_year = 70;
53 tm.tm_wday = 1; 53 tm.tm_wday = 1;
54 tm.tm_yday = 0; /* Not implemented for now */ 54 tm.tm_yday = 0; /* Not implemented for now */
55 tm.tm_isdst = -1; /* Not implemented for now */ 55 tm.tm_isdst = -1; /* Not implemented for now */