summaryrefslogtreecommitdiffstats
path: root/net/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'net/third_party')
-rw-r--r--net/third_party/parseftp/ParseFTPList.cpp3
-rw-r--r--net/third_party/parseftp/ParseFTPList.h5
-rw-r--r--net/third_party/parseftp/chromium.patch8
3 files changed, 16 insertions, 0 deletions
diff --git a/net/third_party/parseftp/ParseFTPList.cpp b/net/third_party/parseftp/ParseFTPList.cpp
index be099e1..6cfb6e6 100644
--- a/net/third_party/parseftp/ParseFTPList.cpp
+++ b/net/third_party/parseftp/ParseFTPList.cpp
@@ -162,6 +162,7 @@ int ParseFTPList(const char *line, struct list_state *state,
uint64 seconds = StringToInt64(p+1);
Time t = Time::FromTimeT(seconds);
t.LocalExplode(&(result->fe_time));
+ result->fe_time.month--;
}
}
}
@@ -1172,6 +1173,7 @@ int ParseFTPList(const char *line, struct list_state *state,
{
Time t = Time::Now();
t.LocalExplode(&(state->now_tm));
+ state->now_tm.month--;
state->now_tm_valid = true;
}
@@ -1640,6 +1642,7 @@ int ParseFTPList(const char *line, struct list_state *state,
{
Time t = Time::Now();
t.LocalExplode(&(state->now_tm));
+ state->now_tm.month--;
state->now_tm_valid = true;
}
result->fe_time.year = state->now_tm.year;
diff --git a/net/third_party/parseftp/ParseFTPList.h b/net/third_party/parseftp/ParseFTPList.h
index b11abdc..c7ff925 100644
--- a/net/third_party/parseftp/ParseFTPList.h
+++ b/net/third_party/parseftp/ParseFTPList.h
@@ -102,6 +102,11 @@
namespace net {
+/* WARNING: The 'month' field of base::Time::Exploded will be in range 0-11
+ * (0 = January) to match PRExplodedTime. The caller should add 1 to 'month'
+ * if it intends to use it.
+ */
+
struct list_state
{
void *magic; /* to determine if previously initialized */
diff --git a/net/third_party/parseftp/chromium.patch b/net/third_party/parseftp/chromium.patch
index 5659817..4021a34 100644
--- a/net/third_party/parseftp/chromium.patch
+++ b/net/third_party/parseftp/chromium.patch
@@ -37,6 +37,7 @@ index b9ffbdc..be099e1 100644
+ uint64 seconds = StringToInt64(p+1);
+ Time t = Time::FromTimeT(seconds);
+ t.LocalExplode(&(result->fe_time));
++ result->fe_time.month--;
}
}
}
@@ -234,6 +235,7 @@ index b9ffbdc..be099e1 100644
- PR_ExplodeTime((state->now_time), PR_LocalTimeParameters, &(state->now_tm) );
+ Time t = Time::Now();
+ t.LocalExplode(&(state->now_tm));
++ state->now_tm.month--;
+ state->now_tm_valid = true;
}
@@ -353,6 +355,7 @@ index b9ffbdc..be099e1 100644
- PR_ExplodeTime((state->now_time), PR_LocalTimeParameters, &(state->now_tm) );
+ Time t = Time::Now();
+ t.LocalExplode(&(state->now_tm));
++ state->now_tm.month--;
+ state->now_tm_valid = true;
}
- result->fe_time.tm_year = state->now_tm.tm_year;
@@ -395,6 +398,11 @@ index 30ef8a3..b11abdc 100644
+namespace net {
+
++/* WARNING: The 'month' field of base::Time::Exploded will be in range 0-11
++ * (0 = January) to match PRExplodedTime. The caller should add 1 to 'month'
++ * if it intends to use it.
++ */
++
struct list_state
{
void *magic; /* to determine if previously initialized */