trentrichardson / Intimidatetime

Intimidatetime is a wicked awesome date time picker for both jQuery and Zepto.
MIT License
17 stars 8 forks source link

documentation error #2

Closed scien closed 10 years ago

scien commented 10 years ago
$('#ex_timezone_2').intimidatetime({
    format: 'yyyy-MM-dd HH:mm zzz',
    units: {
        timezone: {
            format: 'zzz',
            options: [240,300,360,420],
            names: {
                "240": "EDT", 
                "300": "CDT", 
                "360": "MDT",
                "420": "PDT"
            }
        }
    }
});

should be

$('#ex_timezone_2').intimidatetime({
    format: 'yyyy-MM-dd HH:mm zzz',
    units: {
        timezone: {
            format: 'zzz',
            options: [-240, -300, -360, -420],
            names: {
                "-240": "EDT", 
                "-300": "CDT", 
                "-360": "MDT",
                "-420": "PDT"
            }
        }
    }
});
scien commented 10 years ago

nvm. I had this backwards

The getTimezoneOffset() method returns the time difference between UTC time and local time, in minutes. For example, If your time zone is GMT+2, -120 will be returned.

http://www.w3schools.com/jsref/jsref_gettimezoneoffset.asp