GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Plagger::Plugin::Filter::GuessTimeZoneByDomain(3) User Contributed Perl Documentation Plagger::Plugin::Filter::GuessTimeZoneByDomain(3)

Plagger::Plugin::Filter::GuessTimeZoneByDomain - Guess timezone by domains if datetime is floating or UTC

  - module: Filter::GuessTimeZoneByDomain

This plugin guesses feed date timezone by domains, if dates are floating or UTC. It uses the mapping table from ISO 3166 country code to timezones available in Olson database (hence requires DateTime::TimeZone 0.51).

Optionally, if you have IP::Country module installed. This plugin also checks the country name which the host address is assigned to, instead of its domain name (ccTLD).

For example, if the datetime is floating or UTC set in the feed of example.jp, it is resolved to Asia/Tokyo since its ccTLD is jp. In the case of www.asahi.com, ccTLD is null but the IP address is assigned to Japan, hence it is resolved to Asia/Tokyo as well.

conflict_policy
  conflict_policy: cc
  conflict_policy: ip
    

conflict_policy determines what to do if timezones guessed from 1) ccTLD and 2) country code from IP::Country doesn't match. cc prioritizes ccTLD, and ip prioritizes IP::Country.

For example, http://www.sixapart.jp/ has a ccTLD jp, but its host address is assigned to the United States (US). In this case:

  conflict_policy    timezone
  -----------------------------------
  cc                 Asia/Tokyo
  ip                 America/New_York
    

(Note that US has multiple timezones but America/New_York is used since this one is listed first in the Olson database.)

Defaults to cc.

Tatsuhiko Miyagawa

Plagger, Plagger::Plugin::Filter::FloatingDateTime, DateTime::TimeZone
2006-12-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.