1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
diff --git a/base/nvti.c b/base/nvti.c
index 97f1ec63..f1f36cc7 100644
--- a/base/nvti.c
+++ b/base/nvti.c
@@ -192,22 +192,19 @@ parse_nvt_timestamp (const gchar *str_time)
/* $Date: 2012-02-17 16:05:26 +0100 (Fr, 17. Feb 2012) $ */
/* $Date: Fri, 11 Nov 2011 14:42:28 +0100 $ */
memset (&tm, 0, sizeof (struct tm));
- if (strptime ((char *) str_time, "%F %T %z", &tm) == NULL)
+ if (strptime ((char *) str_time, "%Y-%m-%d %T +%H%M", &tm) == NULL && strptime ((char *) str_time, "%Y-%m-%d %T -%H%M", &tm) == NULL)
{
memset (&tm, 0, sizeof (struct tm));
- if (strptime ((char *) str_time, "$Date: %F %T %z", &tm) == NULL)
+ if (strptime ((char *) str_time, "$Date: %Y-%m-%d %T +%H%M", &tm) == NULL && strptime ((char *) str_time, "$Date: %Y-%m-%d %T -%H%M", &tm) == NULL)
{
memset (&tm, 0, sizeof (struct tm));
- if (strptime ((char *) str_time, "%a %b %d %T %Y %z", &tm) == NULL)
+ if (strptime ((char *) str_time, "%a %b %d %T %Y +%H%M", &tm) == NULL && strptime ((char *) str_time, "%a %b %d %T %Y -%H%M", &tm) == NULL)
{
memset (&tm, 0, sizeof (struct tm));
- if (strptime ((char *) str_time, "$Date: %a, %d %b %Y %T %z", &tm)
- == NULL)
+ if (strptime ((char *) str_time, "$Date: %a, %d %b %Y %T +%H%M", &tm) == NULL && strptime ((char *) str_time, "$Date: %a, %d %b %Y %T -%H%M", &tm) == NULL)
{
memset (&tm, 0, sizeof (struct tm));
- if (strptime ((char *) str_time, "$Date: %a %b %d %T %Y %z",
- &tm)
- == NULL)
+ if (strptime ((char *) str_time, "$Date: %a %b %d %T %Y +%H%M", &tm) == NULL && strptime ((char *) str_time, "$Date: %a %b %d %T %Y -%H%M", &tm) == NULL)
{
g_warning ("%s: Failed to parse time: %s", __FUNCTION__,
str_time);
|