[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:41:17 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c0623a2a4020bc24d626390130f8331ff727a19d
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat May 22 07:18:31 2004 +0000
Reviewed by Maciej.
- fixed <rdar://problem/3664260>: (JS needs to listen to timezone change notifications)
* kjs/date_object.cpp: (CopyLocalTimeZone): As per Chris Kane and Jordan Hubbard, use <notify.h>
with a hardcoded string of "com.apple.system.timezone", and do CFTimeZoneResetSystem since
CoreFoundation doesn't do this itself. Turns out this affects the default time zone as long as
it hasn't been set explicitly.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 44e3ea7..0c99f6a 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2004-05-22 Darin Adler <darin at apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed <rdar://problem/3664260>: (JS needs to listen to timezone change notifications)
+
+ * kjs/date_object.cpp: (CopyLocalTimeZone): As per Chris Kane and Jordan Hubbard, use <notify.h>
+ with a hardcoded string of "com.apple.system.timezone", and do CFTimeZoneResetSystem since
+ CoreFoundation doesn't do this itself. Turns out this affects the default time zone as long as
+ it hasn't been set explicitly.
+
=== Safari-141 ===
2004-05-20 Richard Williamson <rjw at apple.com>
diff --git a/JavaScriptCore/kjs/date_object.cpp b/JavaScriptCore/kjs/date_object.cpp
index 3d75057..bee472d 100644
--- a/JavaScriptCore/kjs/date_object.cpp
+++ b/JavaScriptCore/kjs/date_object.cpp
@@ -2,7 +2,7 @@
/*
* This file is part of the KDE libraries
* Copyright (C) 1999-2000 Harri Porten (porten at kde.org)
- * Copyright (C) 2003 Apple Computer, Inc.
+ * Copyright (C) 2004 Apple Computer, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -65,6 +65,7 @@ const time_t invalidDate = -1;
// Originally, we wrote our own implementation that uses Core Foundation because of a performance problem in Mac OS X 10.2.
// But we need to keep using this rather than the standard library functions because this handles a larger range of dates.
+#include <notify.h>
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
@@ -117,6 +118,24 @@ static CFTimeZoneRef UTCTimeZone()
static CFTimeZoneRef CopyLocalTimeZone()
{
+ // Check for a time zone notification, and tell CoreFoundation to re-get the time zone if it happened.
+ // Some day, CoreFoundation may do this itself, but for now it needs our help.
+ static bool registered = false;
+ static int notificationToken;
+ if (!registered) {
+ uint32_t status = notify_register_check("com.apple.system.timezone", ¬ificationToken);
+ if (status == NOTIFY_STATUS_OK) {
+ registered = true;
+ }
+ }
+ if (registered) {
+ int notified;
+ uint32_t status = notify_check(notificationToken, ¬ified);
+ if (status == NOTIFY_STATUS_OK && notified) {
+ CFTimeZoneResetSystem();
+ }
+ }
+
CFTimeZoneRef zone = CFTimeZoneCopyDefault();
if (zone) {
return zone;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list