예제 #1
0
    def setTimeZone(self, tzInfo):
        self.timeZone = tzInfo
        setLocalTimezone(tzInfo.getPyTimeZone())

        userPrefs = self.applicationModel.getUserProfile().getPreferences()
        if tzInfo:
            userPrefs.setUserPreference(IZAppUserPrefsKeys.TIMEZONE, tzInfo.getName())
        else:
            userPrefs.setUserPreference(IZAppUserPrefsKeys.TIMEZONE, u"") #$NON-NLS-1$
예제 #2
0
파일: tzservice.py 프로젝트: mpm2050/Raven
    def setTimeZone(self, tzInfo):
        self.timeZone = tzInfo
        setLocalTimezone(tzInfo.getPyTimeZone())

        userPrefs = self.applicationModel.getUserProfile().getPreferences()
        if tzInfo:
            userPrefs.setUserPreference(IZAppUserPrefsKeys.TIMEZONE,
                                        tzInfo.getName())
        else:
            userPrefs.setUserPreference(IZAppUserPrefsKeys.TIMEZONE,
                                        u"")  #$NON-NLS-1$
예제 #3
0
    def _configureTimeZone(self):
        # 1) look for a command-line override
        # 2) look for a user prefs override
        # 3) try to figure out the TZ from the time.tzname info
        # 4) do nothing
        tzName = self._getCommandLineTZOverride()
        if tzName is None:
            tzName = self._getUserPrefsTZOverride()
        if tzName is None:
            tzName = self._divineTZFromPython()

        # Now, try to set the timezone if one was found
        if tzName is not None:
            tz = self.findTimeZone(tzName)
            if tz is not None:
                self.timeZone = tz
                setLocalTimezone(tz.getPyTimeZone())
예제 #4
0
파일: tzservice.py 프로젝트: mpm2050/Raven
    def _configureTimeZone(self):
        # 1) look for a command-line override
        # 2) look for a user prefs override
        # 3) try to figure out the TZ from the time.tzname info
        # 4) do nothing
        tzName = self._getCommandLineTZOverride()
        if tzName is None:
            tzName = self._getUserPrefsTZOverride()
        if tzName is None:
            tzName = self._divineTZFromPython()

        # Now, try to set the timezone if one was found
        if tzName is not None:
            tz = self.findTimeZone(tzName)
            if tz is not None:
                self.timeZone = tz
                setLocalTimezone(tz.getPyTimeZone())