Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Francisco Caballero
    @fjcero
    Given a scenario that Locale TZ is undefined, moment gets a default timezone
    there is a way to specify a fallback TZ to avoid guessing?
    Francisco Caballero
    @fjcero
    the major issue right now I think is if local timezone is not defined guess() is getting another value for zoneScores instead of returning something like 'UTC' like http://pellepim.bitbucket.org/jstz/ does
    Jason Morawski
    @rpgdude
    hey guys I am having an issue running my karma unit tests, moment.tz is undefined?
    Jason Morawski
    @rpgdude
    figured it out, was a bug external to moment-timezone
    Jennoxxx
    @Jennoxxx
    Hi, for my tests I send a date with a bad format in a moment function so I get this warning "Deprecation warning: value provided is not in a recognized ISO format. moment construction falls back to js Date()...". Is it possible to silence a warning?
    Jennoxxx
    @Jennoxxx
    I stub the console.warn and now it's silent :)
    Matt Johnson-Pint
    @mattjohnsonpint
    @Jennoxxx - the easiest way is to provide a format as the second parameter during parsing. Even if you are intentionally passing a bad format for test - include the format that it normally would have used.
    anilenbake
    @anilenbake
    Hi ,
    I have a major issue with the timezone time :
    I want to convert this date/time string "2017-01-12 02:00:00 UTC" into browser local time zone .
    It is not working in Firefox for the chrome it is working fine
    Showing Invalid date any help?
    Jesse Atkinson
    @jsatk
    Browser specific bug. Hmm… I assume you’re on the latest of stable firefox and all that?
    Malik Harrison
    @Harrmalik
    i would use the moment javascript library
    Makes it easy to work with dates and timezones
    Robert Mennell
    @skatcat31
    If I use moment-timezone, do I also need to include moment or is timezone pulling that in?
    Malik Harrison
    @Harrmalik
    Or you can send me your code and I can see if theres a simpler fix
    Yes!
    Robert Mennell
    @skatcat31
    ... yes?
    oh wait nevermind, misread the package.json. Thanks!
    Malik Harrison
    @Harrmalik
    You need to include both libraries
    Robert Mennell
    @skatcat31
    I do? When I checked hte package.json for node.js it says it includes moment in itself, so you're sayign I ahve to include both and do a require for both??
    Malik Harrison
    @Harrmalik
    The package.json for node.js?
    When i used moment timezone, i always included moment as well
    Malik Harrison
    @Harrmalik
    Got it! Okay your right
    I Always use moment and only sometimes use moment timezone, guess it was typical i had moment already included
    Matt Johnson-Pint
    @mattjohnsonpint
    @anilenbake - you don't need moment-timezone for that. Just do something like:
    moment.utc("2017-01-12 02:00:00 UTC", "YYYY-MM-DD HH:mm:ss [UTC]", true).format()  // "2017-01-12T02:00:00Z"
    EyePulp
    @EyePulp
    Howdy - any way to parse Sun, 05 Feb 2017 11:38:14 PST and Sun, 05 Feb 2017 19:39:49 EST ? The US timezones seem to be problematic.
    Matt Johnson-Pint
    @mattjohnsonpint
    @EyePulp time zone abbreviations are generally unparsable. You might think you know what they mean, but that's entirely subjective. Consider CST could be Central Standard Time (UTC-6), Cuba Standard Time (UTC-5) or China Standard Time (UTC+8).
    Probably, you should go back to where those are generated and make sure they include a numeric offset from UTC in them. If that's not possible, then you have some string replacement to do - but you will indeed be limited and imposing your own assumptions.
    Matt Johnson-Pint
    @mattjohnsonpint
    Also worth noting, that string looks like it's in RFC2822 format. That spec does indeed define certain time zone abbreviations, but they are obsoleted - carried over from the earlier RFC822 format. We have an open item to add built-in support for this older format, in moment/moment#2530
    bhambanip
    @bhambanip
    i am getting this error Moment Timezone found America/Vancouver from the Intl api, but did not have that data loaded.
    Abhijit Rao
    @abhijit945
    Hello, in the docs for parsing the ambiguities we have to pass the offset along with the time, moment.tz("2012-11-04 01:00:00-05:00", "America/New_York"); anyone know how do we get the different offsets and different TZ's for that region? for example: for "America/Chicago" I need CDT and CST along with their offsets so that I can get the appropriate dates based on user selection
    Abhijit Rao
    @abhijit945
    Also, is there anyway to detect if the provided time is ambiguous? I need to ask the user whether they meant CST or CDT when it is ambiguous
    Abhijit Rao
    @abhijit945
    @mj1856 Can you point me in the right direction? Dont know if I missing something here
    Abhijit Rao
    @abhijit945
    Hmm my current option to get the different timezones under "America/New_York" is to tap into zone object (moment.tz.zone("America/Chicago")) and get the unique offsets and unique abbrs. Is there an easier way? Still cant find a way to find if time provided is ambiguous or not
    Evan Siroky
    @evansiroky
    Any update on when a release with 2017a data will be available?
    Evan Siroky
    @evansiroky
    @mj1856 @ssskip ?
    ssskip
    @ssskip
    @evansiroky moment/moment-timezone#458
    Evan Siroky
    @evansiroky
    :+1:
    Daniel Einspanjer
    @deinspanjer
    Hi folks, I'm hoping someone could help me debug a problem with not getting tz data loaded.
    I'm in a bit of a weird environment though. I'm running inside the Postgres plv8 extension.
    I'm using a project called node-plv8 that allows me to install node modules inside plv8 so they can be required and used as normal packages (assuming they don't make use of unsafe features like xhr and such
    I did an npm install moment moment-timezone, and they are available, but moment("2015-01-01T00:00:00 America/New_York") returns null whereas moment("2015-01-01T00:00:00-05:00") works
    Looking in the node_modules directory, I see a builds directory that contains the -with-data* that I imagine I want, but I'm unsure how I would go about requiring that variant of it.
    Daniel Einspanjer
    @deinspanjer
    Ah.. I see in index.js that it does a moment.tz.load(require('.data/packed/latest.json'));. I wonder if maybe that is what is tripping up the plv8 loader
    Daniel Einspanjer
    @deinspanjer
    Oh geeze.. it looks like the tz data is loaded fine.
    the problem appears to be that I'm trying to do moment("2015-01-01T00:00:00 America/New_York"). I just tested moment.tz("2015-01-01T00:00:00", "America/New_York") and that works fine.
    Matt Johnson-Pint
    @mattjohnsonpint
    Sorry, I don't jump on Gitter often enough.... @abhijit945, See my response on your #456
    @evansiroky @ssskip - Thanks. I'll merge and do a release soon