Menu

Offline Message patch

ronaldo
2010-01-12
2013-04-29
  • ronaldo

    ronaldo - 2010-01-12

    I modified the lib. so that is can return the offline message with the offline message sent date.
    I refered the source code the offline message sent date is in GMT string format.
    So,I created StringUtils.gmtTimeToGregorianCalendar method to the GMT string format to local time GregorianCalendar object.

    for example:

    the incoming GMT String as the following:
    "8 Jan 2010 20:00:40 -0800"

    As my machine is in GMT +8 time zone, the return GregorianCalendar object represent 9/1/2010 12:00:40

    Here is my patch:
    http://sourceforge.net/tracker/?func=detail&aid=2930619&group_id=118829&atid=682291

     
  • James Lopez

    James Lopez - 2010-01-12

    Great cstsang! But i wonder which revision of the SVN you have used for this patch, as the last rev. is 124, and it would be great to apply it without being modified other solved issues… If it was made with a SVN rev <124 could you please paste here the changes from each file / diffs ? Thank you!

     
  • Anonymous

    Anonymous - 2010-01-12

    maybe it's better with

    DatatypeConverter.parseDate(datestr).getTime();
    

    ?

     
  • James Lopez

    James Lopez - 2010-01-12

    Oh, I didn't check that, I just wondering if you can paste the whole patch here, because I think it was made before the last SVN commits!

    In order to commit it to SVN I'll need it applied to the last SVN, so you can zip the files again, or maybe it's easy for you to paste here the contents changed, or apply a 'diff'….

    Thanks!

     
  • ronaldo

    ronaldo - 2010-01-13

    jessou:
    It is because the offline message bundle with the sent date.
    The sent date string is in the following format:

    8 Jan 2010 20:00:40 -0800

    However,the method DatatypeConverter.parseDate(datestr).getTime() just convert the string into Calendar object only,
    it does not concern about the time different between M$ server and your machine.Therefore the output

    bluegod:
    I am using SVN rev 115.By the way I cannot attach file here.

     
  • ronaldo

    ronaldo - 2010-01-13

    jessou:
    It is because the offline message bundle with the sent date.
    The sent date string is in the following format:

    8 Jan 2010 20:00:40 -0800

    However,the method DatatypeConverter.parseDate(datestr).getTime() just convert the string into Calendar object only,
    it does not concern about the time different between M$ server and your machine.Therefore the output is not the local time
    ,which is M$ server time.
    I think that is useful for all non US user.

    bluegod:
    I am using SVN rev 115.By the way I cannot attach file here.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.