Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: base/third_party/nspr/prtime.cc

Issue 1997153002: libchrome: Several upstreamable fixes from libchrome Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Addressed feedback Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Portions are Copyright (C) 2011 Google Inc */ 1 /* Portions are Copyright (C) 2011 Google Inc */
2 /* ***** BEGIN LICENSE BLOCK ***** 2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * 4 *
5 * The contents of this file are subject to the Mozilla Public License Version 5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with 6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at 7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/ 8 * http://www.mozilla.org/MPL/
9 * 9 *
10 * Software distributed under the License is distributed on an "AS IS" basis, 10 * Software distributed under the License is distributed on an "AS IS" basis,
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 * 372 *
373 * PR_GMTParameters -- 373 * PR_GMTParameters --
374 * 374 *
375 * Returns the PRTimeParameters for Greenwich Mean Time. 375 * Returns the PRTimeParameters for Greenwich Mean Time.
376 * Trivially, both the tp_gmt_offset and tp_dst_offset fields are 0. 376 * Trivially, both the tp_gmt_offset and tp_dst_offset fields are 0.
377 * 377 *
378 *------------------------------------------------------------------------ 378 *------------------------------------------------------------------------
379 */ 379 */
380 380
381 PRTimeParameters 381 PRTimeParameters
382 PR_GMTParameters(const PRExplodedTime *gmt) 382 PR_GMTParameters(const PRExplodedTime* /*gmt*/)
383 { 383 {
384 PRTimeParameters retVal = { 0, 0 }; 384 PRTimeParameters retVal = { 0, 0 };
385 return retVal; 385 return retVal;
386 } 386 }
387 387
388 /* 388 /*
389 * The following code implements PR_ParseTimeString(). It is based on 389 * The following code implements PR_ParseTimeString(). It is based on
390 * ns/lib/xp/xp_time.c, revision 1.25, by Jamie Zawinski <jwz@netscape.com>. 390 * ns/lib/xp/xp_time.c, revision 1.25, by Jamie Zawinski <jwz@netscape.com>.
391 */ 391 */
392 392
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 + 60 * localTime.tm_hour 1177 + 60 * localTime.tm_hour
1178 + 1440 * (localTime.tm_mday - 2); 1178 + 1440 * (localTime.tm_mday - 2);
1179 } 1179 }
1180 1180
1181 result->tm_params.tp_gmt_offset = zone_offset * 60; 1181 result->tm_params.tp_gmt_offset = zone_offset * 60;
1182 result->tm_params.tp_dst_offset = dst_offset * 60; 1182 result->tm_params.tp_dst_offset = dst_offset * 60;
1183 1183
1184 *result_imploded = PR_ImplodeTime(result); 1184 *result_imploded = PR_ImplodeTime(result);
1185 return PR_SUCCESS; 1185 return PR_SUCCESS;
1186 } 1186 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698