Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 436 * | 436 * |
| 437 * Returns the PRTimeParameters for Greenwich Mean Time. | 437 * Returns the PRTimeParameters for Greenwich Mean Time. |
| 438 * Trivially, both the tp_gmt_offset and tp_dst_offset fields are 0. | 438 * Trivially, both the tp_gmt_offset and tp_dst_offset fields are 0. |
| 439 * | 439 * |
| 440 *------------------------------------------------------------------------ | 440 *------------------------------------------------------------------------ |
| 441 */ | 441 */ |
| 442 | 442 |
| 443 PRTimeParameters | 443 PRTimeParameters |
| 444 PR_GMTParameters(const PRExplodedTime *gmt) | 444 PR_GMTParameters(const PRExplodedTime *gmt) |
| 445 { | 445 { |
| 446 #if defined(XP_MAC) | |
|
wtc
2014/03/22 15:50:19
This is obsolete code. XP_MAC refers to Mac OS Cla
| |
| 447 #pragma unused (gmt) | |
| 448 #endif | |
| 449 | |
| 450 PRTimeParameters retVal = { 0, 0 }; | 446 PRTimeParameters retVal = { 0, 0 }; |
| 451 return retVal; | 447 return retVal; |
| 452 } | 448 } |
| 453 | 449 |
| 454 /* | 450 /* |
| 455 * The following code implements PR_ParseTimeString(). It is based on | 451 * The following code implements PR_ParseTimeString(). It is based on |
| 456 * ns/lib/xp/xp_time.c, revision 1.25, by Jamie Zawinski <jwz@netscape.com>. | 452 * ns/lib/xp/xp_time.c, revision 1.25, by Jamie Zawinski <jwz@netscape.com>. |
| 457 */ | 453 */ |
| 458 | 454 |
| 459 /* | 455 /* |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1201 + 60 * localTime.tm_hour | 1197 + 60 * localTime.tm_hour |
| 1202 + 1440 * (localTime.tm_mday - 2); | 1198 + 1440 * (localTime.tm_mday - 2); |
| 1203 } | 1199 } |
| 1204 | 1200 |
| 1205 result->tm_params.tp_gmt_offset = zone_offset * 60; | 1201 result->tm_params.tp_gmt_offset = zone_offset * 60; |
| 1206 result->tm_params.tp_dst_offset = dst_offset * 60; | 1202 result->tm_params.tp_dst_offset = dst_offset * 60; |
| 1207 | 1203 |
| 1208 *result_imploded = PR_ImplodeTime(result); | 1204 *result_imploded = PR_ImplodeTime(result); |
| 1209 return PR_SUCCESS; | 1205 return PR_SUCCESS; |
| 1210 } | 1206 } |
| OLD | NEW |