Commit Graph

2634 Commits

Author SHA1 Message Date
Felix Krause
0ffd14e169 Updated times.parse() documentation 2016-11-14 19:18:23 +01:00
Felix Krause
434c27343e Parse 'Z' as valid timezone if offset is expected 2016-11-14 18:46:35 +01:00
Felix Krause
0587a57807 Assume local DST iff no timezone is given 2016-11-14 18:36:03 +01:00
Felix Krause
aa08c32c2b Improved -; fixed tests
* added prefix `-` operator for TimeInterval
 * improved `-` for both TimeInterval and TimeInfo
 * Fixed a DST test
2016-11-14 18:28:55 +01:00
Felix Krause
544a2cfe1a Fixed daylight saving time
* When formatting timezone, substract 1 hour from timezone when isDST
 * Do not depend DST in current timezone when parsing arbitrary date
   because formatted timestamps are never in DST.
 * On the way, removed an unnecessary line in parsing code which could
   cause bugs.
 * Added DST tests
2016-11-14 18:28:55 +01:00
Felix Krause
91a0674961 Fixed timezone rendering, added test 2016-11-10 19:03:46 +01:00
Felix Krause
9b2aaf0df6 Fixed timezone sign error
* This was introduced in recent "cosmetic" fix. Not so cosmetic
   after all…
2016-11-08 20:57:53 +01:00
Araq
c66580911e htmlparser: different error corrections 2016-11-07 18:58:39 +01:00
Andreas Rumpf
4c79583a95 Merge pull request #5002 from goldenreign/time-compare-nosideeffect
Add 'noSideEffect' pragma for Time type's operators. Fixes #4981
2016-11-07 16:52:34 +01:00
Andreas Rumpf
be296c3274 Merge pull request #4984 from flyx/timezonefix
Fixed timezone handling
2016-11-07 14:28:54 +01:00
Zajcev Evgeny
b1a369d2fb [enh] isUpperAscii*, isLowerAscii* speedup execution by stopping
iteration as soon as possible
2016-11-07 13:21:17 +03:00
Felix Krause
6e604e2f9f More cosmetic changes
* Don't use factor var, it's overly complicated
 * Removed proc that's now unused
 * Better documented timezone field
2016-11-07 11:08:31 +01:00
goldenreign
63c450abdc Fix - operator for Time type for JS target 2016-11-07 14:26:27 +07:00
goldenreign
554105ff7c Add 'noSideEffect' pragma for Time type's operators 2016-11-07 12:14:28 +07:00
Andreas Rumpf
91bcf99d8a os.nim: posix copyFile showed a weird problem about buffer flushing; worked around via flushFile() call 2016-11-06 17:33:33 +01:00
Andreas Rumpf
5471b1eaca htmlparser: support parsing of class=foobar without quotes 2016-11-05 15:27:47 +01:00
Andreas Rumpf
0a6787f956 better error handling for osproc.nim 2016-11-05 09:04:16 +01:00
Felix Krause
f500b9f47b Cosmetic fixes
* Improved comments
 * Improved spacing
 * Use consts instead of magic numbers
2016-11-03 18:45:52 +01:00
Andreas Rumpf
ee8c1c6f93 Merge pull request #4989 from endragor/empty-async-all
async all() now immediately completes if arg is empty
2016-11-03 10:54:19 +01:00
Ruslan Mustakov
f2bded180f async all() now immediately completes if arg is empty 2016-11-03 10:50:43 +07:00
Dominik Picheta
e784fdee45 Merge pull request #4970 from nigredo-tori/fix-4969
Fix problems with persistent HTTP connections
2016-11-02 18:57:00 +01:00
lihf8515
89d4574445 Update parsecfg.nim
Value includes double quotation marks.
2016-11-02 11:48:11 +08:00
Dmitry Polienko
4753149227 Implement suggestions from @dom96 2016-11-02 09:19:20 +07:00
Felix Krause
9d5de8021b Use ISO 8601 format for times.$. Fixed tests.
* `$` now uses format() with explicit time zone.
 * Fixed errors in rendering "z", "zz" and "zzz"
 * Updated tests
2016-11-01 21:14:52 +01:00
Felix Krause
170745eb39 Removed tzname because it's broken
* No mapping between TimeInfo.tzname and TimeInfo.timezone
 * tzname of time.h is not well-defined, may have almost arbitrary
   length, and localization may differ
 * Code used hardcoded "UTC" string
2016-11-01 20:26:50 +01:00
Felix Krause
c1f0b7643c Fixed timezone offset parsing 2016-11-01 19:33:43 +01:00
Felix Krause
96234f36ca Made times.nim compile again to JS 2016-11-01 18:42:22 +01:00
Felix Krause
2ec6fe56ad Fixed timezone handling
* mktime always interprets its input as local time even on systems where
   gmtoff is present, so using it is utterly useless for anything but getting
   the local timezone. Removed all other usage of gmtoff to avoid confusion.
 * Properly handle timezone offset in toTime()
 * Properly handle timezone offset in `$` because asctime also interprets its
   input as local time
 * Also tried to fix the JavaScript implementation
2016-11-01 17:22:50 +01:00
Araq
47304372ca change TimeImpl for MingW 2016-11-01 14:11:46 +01:00
Felix Krause
af4c75a893 Fixes #4974 2016-10-31 20:46:50 +01:00
Dmitry Polienko
52f4590e98 Don't persist generated headers between requests 2016-10-31 09:46:50 +07:00
Dmitry Polienko
860264a382 Skip empty lines before status line
As recommended here: https://tools.ietf.org/html/rfc7230#section-3.5
2016-10-31 09:42:45 +07:00
andri lim
a42e9b11a7 fixes #4940 2016-10-27 11:32:14 +07:00
Dominik Picheta
b2b2dcff08 Fixes #4959. 2016-10-26 21:26:48 +02:00
Yuriy Glukhov
6690cd15f4 Mark socketError as gcsafe 2016-10-26 20:17:40 +03:00
Felix Krause
7476e4fcb2 Fixes #4946 2016-10-24 22:36:21 +02:00
Andreas Rumpf
2f725e923e Merge pull request #4924 from nigredo-tori/fix-4917
Make createDir return discardable bool
2016-10-24 20:30:52 +02:00
Araq
8a0b945170 asynchttpserver: cleanup example code 2016-10-24 20:28:27 +02:00
Andreas Rumpf
3effd52ca3 Merge pull request #4847 from honewatson/patch-1
Add respond proc example
2016-10-24 20:27:16 +02:00
Andreas Rumpf
00f09f1309 Merge pull request #4819 from andreaferretti/usefulmacros
Some useful macros
2016-10-24 18:41:45 +02:00
Andreas Rumpf
86ca077324 Merge pull request #4943 from nigredo-tori/fix-4942
Reset HttpClient if new URL has different port
2016-10-24 17:07:30 +02:00
Andreas Rumpf
236c2beead Merge pull request #4935 from flyx/tablefix
Table fixes. fixes #4901
2016-10-24 17:07:03 +02:00
Andreas Rumpf
353ce7315a Merge pull request #4938 from FedericoCeratto/unittest
Improve unittest docs
2016-10-24 17:03:11 +02:00
Andreas Rumpf
8208a2db84 Merge pull request #4937 from cheatfate/newos
Some changes to os.nim
2016-10-24 17:02:15 +02:00
Dmitry Polienko
8fb7858291 Reset HttpClient if new URL has different port 2016-10-24 09:42:18 +07:00
Andreas Rumpf
c486e6377c fixes #4386 2016-10-23 17:43:38 +02:00
Federico Ceratto
767e0846c1 Improve unittest docs 2016-10-23 16:13:38 +01:00
cheatfate
c21bc6c61c Fix for getCurrentDir().
Fix for expandFilename().
Fix for getAppFilename().
2016-10-23 16:41:04 +03:00
Felix Krause
73b0bb52bb Table fixes. fixes #4901
* added `==` for OrderedTable, CountTable and the *Ref types
 * added missing documentation to all `==` procs
 * fixed clear() for OrderedTables, which did not work because `var`
   does not work well with `|`
 * added tests
2016-10-23 11:21:52 +02:00
Andreas Rumpf
9f895c6f5a Merge pull request #4931 from nigredo-tori/fix-4929
Fix isAbsolute for Windows root directories
2016-10-22 16:20:06 +02:00