mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
fix test to use consistent time zone (GMT)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39921 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5d272a49e5
commit
d9d4cd2982
1 changed files with 3 additions and 0 deletions
|
@ -14,6 +14,7 @@ static NSString *
|
||||||
formattedDaysSince1970(double daysSince1970)
|
formattedDaysSince1970(double daysSince1970)
|
||||||
{
|
{
|
||||||
NSCalendarDate *calendarDate;
|
NSCalendarDate *calendarDate;
|
||||||
|
NSTimeZone *tz;
|
||||||
NSString *formattedDate;
|
NSString *formattedDate;
|
||||||
double secondsSinceReference;
|
double secondsSinceReference;
|
||||||
|
|
||||||
|
@ -27,6 +28,8 @@ formattedDaysSince1970(double daysSince1970)
|
||||||
|
|
||||||
calendarDate = [[NSCalendarDate alloc]
|
calendarDate = [[NSCalendarDate alloc]
|
||||||
initWithTimeIntervalSinceReferenceDate: secondsSinceReference];
|
initWithTimeIntervalSinceReferenceDate: secondsSinceReference];
|
||||||
|
tz = [NSTimeZone timeZoneWithName: @"GMT"];
|
||||||
|
[calendarDate setTimeZone: tz];
|
||||||
|
|
||||||
formattedDate = [calendarDate descriptionWithCalendarFormat: @"%d-%m-%Y"];
|
formattedDate = [calendarDate descriptionWithCalendarFormat: @"%d-%m-%Y"];
|
||||||
RELEASE(calendarDate);
|
RELEASE(calendarDate);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue