Git Product home page Git Product logo

timezones's People

Contributors

gulpf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

timezones's Issues

`nimble test` fails with the latest Nim

When trying to run nimble test locally, I get:

timezones/posixtimezones.nim(398, 33) Error: can raise an unlisted exception: ref OSError


When run on Nim's CI, the error message is:

tests\tests.nim(20, 61): Check failed: initDateTime(21, mOct, 2017, 1, 0, 0).format(f) == "2017-10-21 01:00 +02:00"
initDateTime(21, mOct, 2017, 1, 0, 0).format(f) was 2017-10-21 01:00 +00:00
[FAILED] dst edge cases

Error during install using nim v1.2.0

First off, thanks for a very helpful library!

I've set up github actions for testing and am seeing an issue with installing the library when referenced from a nimble file. This install problem doesn't occur with other libs, only timezones.

To help diagnose, I created a minimal repo that reproduces the issue I'm seeing. Look at the github actions tab to see the failures and the last passing case.

https://github.com/hiteshjasani/nim-timezones-testing-bug

 Installing [email protected]
    Reading official package list
Downloading https://github.com/GULPF/timezones using git
    Cloning latest tagged version: v0.5.1
  Verifying dependencies for [email protected]
 Installing [email protected]
     Error: No binaries built, did you specify a valid binary name?
##[error]Process completed with exit code 1.

this doesn't work on windows

$ nimble install timezones
Downloading https://github.com/GULPF/timezones using git
Verifying dependencies for [email protected]
Installing [email protected]
Building timezones/timezones/fetchjsontimezones.exe using c backend
Prompt: Build failed for '[email protected]', would you like to try installing 'timezones@#head' (latest unstable)? [y/N]
Answer: y
Downloading https://github.com/GULPF/timezones using git
Verifying dependencies for timezones@#head
Installing timezones@#head
Building timezones/timezones/fetchjsontimezones.exe using c backend
Tip: 5 messages have been suppressed, use --verbose to show them.
Error: Build failed for package: timezones
... Details:
... Execution failed with exit code 1
... Command: "C:\Users\jqb\scoop\shims\nim.exe" c --noNimblePath -d:NimblePkgVersion=0.5.2 -d:release -o:"C:\Users\jqb\AppData\Local\Temp\nimble_19820\githubcom_GULPFtimezones_#head\timezones\fetchjsontimezones.exe" "C:\Users\jqb\AppData\Local\Temp\nimble_19820\githubcom_GULPFtimezones_#head\timezones\fetchjsontimezones.nim"
... Output: Hint: used config file 'C:\Users\jqb\scoop\apps\nim\current\config\nim.cfg' [Conf]
... Hint: used config file 'C:\Users\jqb\AppData\Local\Temp\nimble_19820\githubcom_GULPFtimezones_#head\timezones\fetchjsontimezones.nim.cfg' [Conf]
... Hint: system [Processing]
... Hint: widestrs [Processing]
... Hint: io [Processing]
... Hint: fetchjsontimezones [Processing]
... Hint: httpclient [Processing]
... Hint: net [Processing]
... Hint: nativesockets [Processing]
... Hint: os [Processing]
... Hint: strutils [Processing]
... Hint: parseutils [Processing]
... Hint: math [Processing]
... Hint: bitops [Processing]
... Hint: macros [Processing]
... Hint: algorithm [Processing]
... Hint: unicode [Processing]
... Hint: pathnorm [Processing]
... Hint: osseps [Processing]
... Hint: winlean [Processing]
... Hint: dynlib [Processing]
... Hint: times [Processing]
... Hint: options [Processing]
... Hint: typetraits [Processing]
... Hint: time_t [Processing]
... Hint: sets [Processing]
... Hint: hashes [Processing]
... Hint: monotimes [Processing]
... Hint: ssl_certs [Processing]
... Hint: ospaths [Processing]
... Hint: openssl [Processing]
... Hint: uri [Processing]
... Hint: base64 [Processing]
... Hint: mimetypes [Processing]
... Hint: strtabs [Processing]
... Hint: streams [Processing]
... Hint: random [Processing]
... Hint: httpcore [Processing]
... Hint: tables [Processing]
... Hint: asyncnet [Processing]
... Hint: asyncdispatch [Processing]
... Hint: heapqueue [Processing]
... Hint: asyncstreams [Processing]
... Hint: asyncfutures [Processing]
... Hint: deques [Processing]
... Hint: cstrutils [Processing]
... Hint: asyncfile [Processing]
... Hint: osproc [Processing]
... Hint: cpuinfo [Processing]
... Hint: strformat [Processing]
... Hint: sequtils [Processing]
... Hint: parseopt [Processing]
... Hint: timezonedbs [Processing]
... Hint: json [Processing]
... Hint: lexbase [Processing]
... Hint: parsejson [Processing]
... Hint: coordinates [Processing]
... Hint: posixtimezones [Processing]
... Hint: sugar [Processing]
... Hint: underscored_calls [Processing]
... Hint: zone1970 [Processing]
... Hint: timezones [Processing]
... Hint: tzversion [Processing]
... C:\Users\jqb\AppData\Local\Temp\nimble_19820\githubcom_GULPFtimezones_#head\timezones\posixtimezones.nim(24, 10) Error: The posixtimezones module is only available on posix systems.

why DateTime compare fails?

it without problem before I using timezones to parse tz info.

....
12:28 PM EST November 16, 2017==2017-11-16T12:28:00-05:00!=0001-00-00T00:00:00+00:00
12-Mar-19==0019-03-12T00:00:00Z!=0001-00-00T00:00:00+00:00
13-Nov-19==0019-11-13T00:00:00Z!=0001-00-00T00:00:00+00:00
1-Jul-15==0015-07-01T00:00:00Z!=0001-00-00T00:00:00+00:00
 March 23, 2019==2019-03-23T00:00:00Z!=0001-00-00T00:00:00+00:00
.....
[FAILED] all
Error: execution of an external program failed: '/Users/bung/nim_works/datetime_parse/tests/test1 '
     Error: Execution failed with exit code 256
        ... Command: "/Users/bung/.nimble/bin/nim" c --noNimblePath -d:NimblePkgVersion=0.1.0 --path:"/Users/bung/.nimble/pkgs/timezones-0.5.1" "-r" "--path:."  "/Users/bung/nim_works/datetime_parse/tests/test1"

https://github.com/bung87/datetime_parse/blob/master/tests/test1.nim

README.md needs updating

The function loadTzDb is available, not loadJsonTimezones. Also parseTzDb, not parseJsonTimezones.

The link to fetchjsontimezones points to itself. I assume it should point to the relevant Nim source file.

A way to get current timezone name?

Is there some way to get the name of the current timezone or is this functionality current missing? i.e. tzInfo("LOCAL").tzName == "Europe/London" or similar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.