How to get uclibc style timezone string (e.g GMT+0IST-1,M3.5.0/01:00:00,M10.5.0/02:00:00)from javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rohit

    How to get uclibc style timezone string (e.g GMT+0IST-1,M3.5.0/01:00:00,M10.5.0/02:00:00)from javascript

    I am trying to get client machine's timezone from my java script . But
    i have no idea how would i be able to get it in uclibc format. (e.g.
    GMT+0IST-1,M3.5.0/01:00:00,M10.5. 0/02:00:00) . I saw couple of posting
    on net from which suggest getTimezoneoffs et or may be calculation with
    dates from script gives correct offset including day light saving
    time but i am not sure how correct this is. Again even if its
    correct , its not telling me when (exact date and time )day light
    saving adjustment starts and ends which is last part of /etc/TZ
    string, Is there a way to get this from java script.

    -- Rohit
  • Dr J R Stockton

    #2
    Re: How to get uclibc style timezone string (e.g GMT+0IST-1,M3.5.0/01:00:00,M10.5. 0/02:00:00)from javascript

    On Jul 2, 10:48 am, Rohit <will.u.tellmem ...@gmail.comwr ote:
    I am trying to get client machine's timezone from my java script . But
    i have no idea how would i be able to get it in uclibc format. (e.g.
    GMT+0IST-1,M3.5.0/01:00:00,M10.5. 0/02:00:00) . I saw couple of posting
    on net from which suggest getTimezoneoffs et or may be calculation with
    dates from script  gives correct  offset including day light saving
    time but i am not sure how correct this is. Again even if its
    correct , its not telling me when (exact date and time )day light
    saving adjustment starts and ends which is last part of /etc/TZ
    string, Is there  a way to get this from java script.
    You mean JavaScript; or you mean Java and are in the wrong place.
    And I guess you mean BST not IST. That is not a timezone; a timezone
    reflects only Standard (Winter) Time, and does not change with the
    seasons. The timezone corresponds to the first number in the string.

    My Web page <URL:http://www.merlyn.demo n.co.uk/js-date5.htmdoes
    rather the opposite. And <URL:http://www.merlyn.demon.co.uk/js-
    date2.htm>
    shows how to determine the transitions for a given year. That, done
    for
    a few years, should enable the numerical part of the string to be
    determined

    The acronyms cannot in general be obtained. In any case, they are not
    well-defined.

    --
    (c) John Stockton, near London, UK. Posting with Google.
    Mail: J.R.""""""""@ph ysics.org or (better) via Home Page at
    Web: <URL:http://www.merlyn.demo n.co.uk/>
    FAQish topics, acronyms, links, etc.; Date, Delphi, JavaScript, ...

    Comment

    • Rohit

      #3
      Re: How to get uclibc style timezone string (e.g GMT+0IST-1,M3.5.0/01:00:00,M10.5. 0/02:00:00)from javascript

      On Jul 2, 6:14 pm, Dr J R Stockton <J.R.Stock...@p hysics.orgwrote :
      On Jul 2, 10:48 am, Rohit <will.u.tellmem ...@gmail.comwr ote:
      >
      I am trying to get client machine's timezone from my java script . But
      i have no idea how would i be able to get it in uclibc format. (e.g.
      GMT+0IST-1,M3.5.0/01:00:00,M10.5. 0/02:00:00) . I saw couple of posting
      on net from which suggest getTimezoneoffs et or may be calculation with
      dates from script gives correct offset including day light saving
      time but i am not sure how correct this is. Again even if its
      correct , its not telling me when (exact date and time )day light
      saving adjustment starts and ends which is last part of /etc/TZ
      string, Is there a way to get this from java script.
      >
      You mean JavaScript; or you mean Java and are in the wrong place.
      And I guess you mean BST not IST. That is not a timezone; a timezone
      reflects only Standard (Winter) Time, and does not change with the
      seasons. The timezone corresponds to the first number in the string.
      >
      My Web page <URL:http://www.merlyn.demo n.co.uk/js-date5.htmdoes
      rather the opposite. And <URL:http://www.merlyn.demon.co.uk/js-
      date2.htm>
      shows how to determine the transitions for a given year. That, done
      for
      a few years, should enable the numerical part of the string to be
      determined
      >
      The acronyms cannot in general be obtained. In any case, they are not
      well-defined.
      >
      --
      (c) John Stockton, near London, UK. Posting with Google.
      Mail: J.R.""""""""@ph ysics.org or (better) via Home Page at
      Web: <URL:http://www.merlyn.demo n.co.uk/>
      FAQish topics, acronyms, links, etc.; Date, Delphi, JavaScript, ...
      No no acronym are not real concern. I just put on string for example.
      By timezone here what i really mean is string which indicates
      following things.
      (TZ env variable in embedded systems if you happen to know)

      Need to know offset from GMT : e.g. GMT+5:30
      Start of Daylight saving time : M3.5.0/01:00:00 : meaning at 1 on 0
      th day(sunday), Week 5
      Month: March
      End of Daylight saving time : M10.5.0/02:00:00 : meaning at 2 on
      0th day(sunday), Week 5
      Month: October

      --Rohit

      Comment

      • Dr J R Stockton

        #4
        Re: How to get uclibc style timezone string (e.g GMT+0IST-1,M3.5.0/01:00:00,M10.5. 0/02:00:00)from javascript

        On Jul 3, 7:12 am, Rohit <will.u.tellmem ...@gmail.comwr ote:
        I have also started separate thread for this question.
        Discussion fragmentation is deeply annoying, and leads to a loss of
        interest in helping you.

        Don't refer to articles by display position; that dependa in the
        reading agent and its settings. Give thread subject, date, author,
        message-ID.

        Be aware that excessively long Subjects are a PITA.

        Read, understand, and follow the newsgroup FAQ and the other links
        provided.

        --
        (c) John Stockton, near London, UK. Posting with Google.
        Mail: J.R.""""""""@ph ysics.org or (better) via Home Page at
        Web: <URL:http://www.merlyn.demo n.co.uk/>
        FAQish topics, acronyms, links, etc.; Date, Delphi, JavaScript, ...

        Comment

        • Rohit

          #5
          Re: How to get uclibc style timezone string (e.g GMT+0IST-1,M3.5.0/01:00:00,M10.5. 0/02:00:00)from javascript

          On Jul 3, 2:31 pm, Dr J R Stockton <J.R.Stock...@p hysics.orgwrote :
          On Jul 3, 7:12 am, Rohit <will.u.tellmem ...@gmail.comwr ote:
          >
          I have also started separate thread for this question.
          >
          Discussion fragmentation is deeply annoying, and leads to a loss of
          interest in helping you.
          >
          Yes but if you can divide the problem in multiple components and each
          can be individually answered, i do not see any problem in this. If
          they are related provide the link . (Thats how things anyway get
          related).
          Don't refer to articles by display position; that dependa in the
          reading agent and its settings. Give thread subject, date, author,
          message-ID.
          >
          Be aware that excessively long Subjects are a PITA.
          Agreed but its not just you and me out there. There are people who
          kind of expect enough description in subject so they can decide
          whether to click there or not. Please do not impose your style upon
          others.
          >
          Read, understand, and follow the newsgroup FAQ and the other links
          provided.
          >
          I have done this but there are quite few good ways to do same thing
          and not one always. We do not need to agree on each aspect of this
          thing unless things go really bad. Having said that i still see your
          point of short subject as valid but i do not understand why should
          that make someone who is there to answer questions NOT respond to the
          actual question.

          Thanks,
          Rohit

          Comment

          Working...