Re: Review Request 113076: kcookiejar: Fix parsing of weird dates

2013-10-08 Thread Kevin Ottens


 On Oct. 5, 2013, 8:53 a.m., David Faure wrote:
  Good catch about the format string syntax changes between kde and qt.
  
  But why not just add t to the format string to include the timezone, as 
  it used to do with %Z, instead of the removeTimeZone() function?
 
 
 Aurélien Gâteau wrote:
 As far as I can tell, t is not supported in QDateTime format string. 
 There is however the, new in 5.2, QTimeZone class. I am going to rework the 
 patch to use it instead of ignoring the time zone information.

t is supported by toString but not fromString.


- Kevin


---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113076/#review41267
---


On Oct. 7, 2013, 12:47 p.m., Aurélien Gâteau wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/113076/
 ---
 
 (Updated Oct. 7, 2013, 12:47 p.m.)
 
 
 Review request for KDE Frameworks and John Layt.
 
 
 Repository: kdelibs
 
 
 Description
 ---
 
 This fixes kcookiejartest, which was failing to parse the date from the Y2K38 
 check.
 
 The test started failing on build.kde.org when the Qt version here was 
 switched to the stable branch, which seems to parse things differently than 
 the version of Qt build.kde.org used to run.
 
 The code was ported from KDateTime::fromString() to QDateTime::fromString(), 
 whose syntax for date formatting is different, but the format was not updated.
 
 This patch is incomplete, see the FIXME comments in removeTimeZone(). But I 
 want to ensure this is the correct way to go before getting into timezones.
 
 
 Diffs
 -
 
   kioslave/http/kcookiejar/kcookiejar.cpp e943da9 
 
 Diff: http://git.reviewboard.kde.org/r/113076/diff/
 
 
 Testing
 ---
 
 kcookiejartest now passes again (must be run with LANG=C btw)
 
 
 Thanks,
 
 Aurélien Gâteau
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 113076: kcookiejar: Fix parsing of weird dates

2013-10-08 Thread Kevin Ottens

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113076/#review41381
---

Ship it!


Ship It!

- Kevin Ottens


On Oct. 7, 2013, 12:47 p.m., Aurélien Gâteau wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/113076/
 ---
 
 (Updated Oct. 7, 2013, 12:47 p.m.)
 
 
 Review request for KDE Frameworks and John Layt.
 
 
 Repository: kdelibs
 
 
 Description
 ---
 
 This fixes kcookiejartest, which was failing to parse the date from the Y2K38 
 check.
 
 The test started failing on build.kde.org when the Qt version here was 
 switched to the stable branch, which seems to parse things differently than 
 the version of Qt build.kde.org used to run.
 
 The code was ported from KDateTime::fromString() to QDateTime::fromString(), 
 whose syntax for date formatting is different, but the format was not updated.
 
 This patch is incomplete, see the FIXME comments in removeTimeZone(). But I 
 want to ensure this is the correct way to go before getting into timezones.
 
 
 Diffs
 -
 
   kioslave/http/kcookiejar/kcookiejar.cpp e943da9 
 
 Diff: http://git.reviewboard.kde.org/r/113076/diff/
 
 
 Testing
 ---
 
 kcookiejartest now passes again (must be run with LANG=C btw)
 
 
 Thanks,
 
 Aurélien Gâteau
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 113076: kcookiejar: Fix parsing of weird dates

2013-10-08 Thread Commit Hook

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113076/#review41389
---


This review has been submitted with commit 
8dda23a557ead9013e177467256f6c7f18d915b8 by Aurélien Gâteau to branch 
frameworks.

- Commit Hook


On Oct. 7, 2013, 12:47 p.m., Aurélien Gâteau wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/113076/
 ---
 
 (Updated Oct. 7, 2013, 12:47 p.m.)
 
 
 Review request for KDE Frameworks and John Layt.
 
 
 Repository: kdelibs
 
 
 Description
 ---
 
 This fixes kcookiejartest, which was failing to parse the date from the Y2K38 
 check.
 
 The test started failing on build.kde.org when the Qt version here was 
 switched to the stable branch, which seems to parse things differently than 
 the version of Qt build.kde.org used to run.
 
 The code was ported from KDateTime::fromString() to QDateTime::fromString(), 
 whose syntax for date formatting is different, but the format was not updated.
 
 This patch is incomplete, see the FIXME comments in removeTimeZone(). But I 
 want to ensure this is the correct way to go before getting into timezones.
 
 
 Diffs
 -
 
   kioslave/http/kcookiejar/kcookiejar.cpp e943da9 
 
 Diff: http://git.reviewboard.kde.org/r/113076/diff/
 
 
 Testing
 ---
 
 kcookiejartest now passes again (must be run with LANG=C btw)
 
 
 Thanks,
 
 Aurélien Gâteau
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 113076: kcookiejar: Fix parsing of weird dates

2013-10-07 Thread Aurélien Gâteau


 On Oct. 5, 2013, 10:53 a.m., David Faure wrote:
  Good catch about the format string syntax changes between kde and qt.
  
  But why not just add t to the format string to include the timezone, as 
  it used to do with %Z, instead of the removeTimeZone() function?
 

As far as I can tell, t is not supported in QDateTime format string. There is 
however the, new in 5.2, QTimeZone class. I am going to rework the patch to use 
it instead of ignoring the time zone information.


- Aurélien


---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113076/#review41267
---


On Oct. 3, 2013, 6 p.m., Aurélien Gâteau wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/113076/
 ---
 
 (Updated Oct. 3, 2013, 6 p.m.)
 
 
 Review request for KDE Frameworks and John Layt.
 
 
 Repository: kdelibs
 
 
 Description
 ---
 
 This fixes kcookiejartest, which was failing to parse the date from the Y2K38 
 check.
 
 The test started failing on build.kde.org when the Qt version here was 
 switched to the stable branch, which seems to parse things differently than 
 the version of Qt build.kde.org used to run.
 
 The code was ported from KDateTime::fromString() to QDateTime::fromString(), 
 whose syntax for date formatting is different, but the format was not updated.
 
 This patch is incomplete, see the FIXME comments in removeTimeZone(). But I 
 want to ensure this is the correct way to go before getting into timezones.
 
 
 Diffs
 -
 
   kioslave/http/kcookiejar/kcookiejar.cpp e943da9 
 
 Diff: http://git.reviewboard.kde.org/r/113076/diff/
 
 
 Testing
 ---
 
 kcookiejartest now passes again (must be run with LANG=C btw)
 
 
 Thanks,
 
 Aurélien Gâteau
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 113076: kcookiejar: Fix parsing of weird dates

2013-10-07 Thread Aurélien Gâteau

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113076/
---

(Updated Oct. 7, 2013, 2:47 p.m.)


Review request for KDE Frameworks and John Layt.


Changes
---

Simplified the code: reading the RFC shows there is no need to handle timezones.

See http://tools.ietf.org/html/rfc2616#section-3.3.1

Relevant quote:

All HTTP date/time stamps MUST be represented in Greenwich Mean Time
   (GMT), without exception. For the purposes of HTTP, GMT is exactly
   equal to UTC (Coordinated Universal Time). This is indicated in the
   first two formats by the inclusion of GMT as the three-letter
   abbreviation for time zone, and MUST be assumed when reading the
   asctime format. HTTP-date is case sensitive and MUST NOT include
   additional LWS beyond that specifically included as SP in the
   grammar.

   HTTP-date= rfc1123-date | rfc850-date | asctime-date
   rfc1123-date = wkday , SP date1 SP time SP GMT
   rfc850-date  = weekday , SP date2 SP time SP GMT
   asctime-date = wkday SP date3 SP time SP 4DIGIT


Repository: kdelibs


Description
---

This fixes kcookiejartest, which was failing to parse the date from the Y2K38 
check.

The test started failing on build.kde.org when the Qt version here was switched 
to the stable branch, which seems to parse things differently than the 
version of Qt build.kde.org used to run.

The code was ported from KDateTime::fromString() to QDateTime::fromString(), 
whose syntax for date formatting is different, but the format was not updated.

This patch is incomplete, see the FIXME comments in removeTimeZone(). But I 
want to ensure this is the correct way to go before getting into timezones.


Diffs (updated)
-

  kioslave/http/kcookiejar/kcookiejar.cpp e943da9 

Diff: http://git.reviewboard.kde.org/r/113076/diff/


Testing
---

kcookiejartest now passes again (must be run with LANG=C btw)


Thanks,

Aurélien Gâteau

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 113076: kcookiejar: Fix parsing of weird dates

2013-10-05 Thread David Faure

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113076/#review41267
---


Good catch about the format string syntax changes between kde and qt.

But why not just add t to the format string to include the timezone, as it 
used to do with %Z, instead of the removeTimeZone() function?


- David Faure


On Oct. 3, 2013, 4 p.m., Aurélien Gâteau wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://git.reviewboard.kde.org/r/113076/
 ---
 
 (Updated Oct. 3, 2013, 4 p.m.)
 
 
 Review request for KDE Frameworks and John Layt.
 
 
 Repository: kdelibs
 
 
 Description
 ---
 
 This fixes kcookiejartest, which was failing to parse the date from the Y2K38 
 check.
 
 The test started failing on build.kde.org when the Qt version here was 
 switched to the stable branch, which seems to parse things differently than 
 the version of Qt build.kde.org used to run.
 
 The code was ported from KDateTime::fromString() to QDateTime::fromString(), 
 whose syntax for date formatting is different, but the format was not updated.
 
 This patch is incomplete, see the FIXME comments in removeTimeZone(). But I 
 want to ensure this is the correct way to go before getting into timezones.
 
 
 Diffs
 -
 
   kioslave/http/kcookiejar/kcookiejar.cpp e943da9 
 
 Diff: http://git.reviewboard.kde.org/r/113076/diff/
 
 
 Testing
 ---
 
 kcookiejartest now passes again (must be run with LANG=C btw)
 
 
 Thanks,
 
 Aurélien Gâteau
 


___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Review Request 113076: kcookiejar: Fix parsing of weird dates

2013-10-03 Thread Aurélien Gâteau

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113076/
---

Review request for KDE Frameworks and John Layt.


Repository: kdelibs


Description
---

This fixes kcookiejartest, which was failing to parse the date from the Y2K38 
check.

The test started failing on build.kde.org when the Qt version here was switched 
to the stable branch, which seems to parse things differently than the 
version of Qt build.kde.org used to run.

The code was ported from KDateTime::fromString() to QDateTime::fromString(), 
whose syntax for date formatting is different, but the format was not updated.

This patch is incomplete, see the FIXME comments in removeTimeZone(). But I 
want to ensure this is the correct way to go before getting into timezones.


Diffs
-

  kioslave/http/kcookiejar/kcookiejar.cpp e943da9 

Diff: http://git.reviewboard.kde.org/r/113076/diff/


Testing
---

kcookiejartest now passes again (must be run with LANG=C btw)


Thanks,

Aurélien Gâteau

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel