equal
deleted
inserted
replaced
367 else : |
367 else : |
368 return pytz.timezone(name) |
368 return pytz.timezone(name) |
369 |
369 |
370 def is_default (self, tz) : |
370 def is_default (self, tz) : |
371 """ |
371 """ |
372 True if it's a FixedOffsetTimezone |
372 True if it's a FixedOffsetTimezone or PREF_TIMEZONE_DEFAULT |
373 """ |
373 """ |
374 |
374 |
375 return (isinstance(tz, utils.FixedOffsetTimezone)) |
375 return (isinstance(tz, utils.FixedOffsetTimezone) or tz == config.PREF_TIMEZONE_DEFAULT) |
376 |
376 |
377 def build (self, tz) : |
377 def build (self, tz) : |
378 """ |
378 """ |
379 FixedOffsetTimezone -> None |
379 FixedOffsetTimezone -> None |
380 pytz.timezone -> tz_name |
380 pytz.timezone -> tz_name |
405 elif prefs[timezone_offset] is not None : |
405 elif prefs[timezone_offset] is not None : |
406 return utils.FixedOffsetTimezone(prefs[timezone_offset]) |
406 return utils.FixedOffsetTimezone(prefs[timezone_offset]) |
407 |
407 |
408 # default |
408 # default |
409 else : |
409 else : |
410 print |
|
411 print "Timezone.process: %r, %r -> default: %r" % (prefs, tz, config.PREF_TIMEZONE_DEFAULT) |
|
412 return config.PREF_TIMEZONE_DEFAULT |
410 return config.PREF_TIMEZONE_DEFAULT |
413 |
411 |
414 class ImageFont (Preference) : |
412 class ImageFont (Preference) : |
415 """ |
413 """ |
416 Font for ImageFormatter |
414 Font for ImageFormatter |