Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    anilenbake
    @anilenbake
    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
    @deinspanjer - yep, we don't have any way for moment's parser to fish out a time zone id and call into moment-timezone. You have to call it directly.
    Yonatan Kogan
    @yoni-tock
    I'm going to take a quick stab at moment/moment-timezone#208
    if that's a mistake for some reason, let me know, haha
    Yonatan Kogan
    @yoni-tock
    Andddd bailed. I'd like to come back at some point however
    Chi Nguyen
    @midori0507
    if i create a moment with moment(1494595195,'X') it return a valid one, but when i set default timezone moment.tz.setDefault(America/Los_Angeles) for example and create same moment, it return an invalid Date
    Matt Chandler
    @mchandleraz

    I'm stuck on a problem and would really appreciate some help.

    I'm trying to use moment-timezone to schedule an event based on the users time zone. ie, User lives in Denver and should receive a push notification at a given time, regardless of the servers time. I have the users time zone and their chosen delivery time/date. No matter what I do, I can't get it to work. I know I'm missing something small, but this is killin' me lol

    Matt Johnson-Pint
    @mattjohnsonpint
    @mchandleraz - not sure how to help you. "I can't get it to work" isn't a very good description of the problem. Paste a code snippet here, or ask (with supporting details) on StackOverflow. Thanks.
    @midori0507 - I wasn't able to reproduce that. It works for me. (I assume you meant to put quotes around the time zone id)
    Prithwiraj Sinha
    @Pritzomania
    Hi, Is there a way to check if a timezone identifier e.g. 'America/Chicago' is valid using moment timezone ?
    The thing I am trying to do is this - If the timezone identifier provided is valid, use it otherwise fallback to a default timezone identifier value. And for that I am not seeing any straightforward way of doing it. Please help.