Comments (4)
Looked into it even more ;)
You are absolutely correct and moment() does indeed try to set the user's local time.
My own timezone settings were not configured correctly. I'm now seeing results as expected:
me@mine:~ $ football scores
Denmark 0 vs. 0 France Yesterday at 7:00 AM
Australia 0 vs. 2 Peru Yesterday at 7:00 AM
Nigeria 1 vs. 2 Argentina Yesterday at 11:00 AM
Iceland 1 vs. 2 Croatia Yesterday at 11:00 AM
Mexico 0 vs. 3 Sweden Today at 7:00 AM
Korea Republic 2 vs. 0 Germany Today at 7:00 AM
Nice looking Pacific times!
from football-cli.
As far as I can tell, football fixtures
makes use of moment.calendar()
which converts date and time to text based on your local time.
Maybe I didn't quite get the issue. If you could add an example for it, it would be great. 😄
from football-cli.
Looking into this a bit more, according to the API's docs it returns fixture.date
formatted as UTC (based on the ISO format with 'Z' and no offset).
I think the default referenceTime
argument to moment.calendar()
is also UTC (that is, Unix time).
Current output to date
on my machine: Wed Jun 27 06:16:48 UTC 2018
Local time for me (US PST): Tue Jun 26 23:16:48
So when I run football fixtures -d 2 -l WC
I get the following output:
World Cup Saudi Arabia 2 vs. 1 Egypt Last Monday at 2:00 PM
World Cup Uruguay 3 vs. 0 Russia Last Monday at 2:00 PM
World Cup Iran 1 vs. 1 Portugal Last Monday at 6:00 PM
World Cup Spain 2 vs. 2 Morocco Last Monday at 6:00 PM
World Cup Denmark 0 vs. 0 France Yesterday at 2:00 PM
World Cup Australia 0 vs. 2 Peru Yesterday at 2:00 PM
World Cup Nigeria 1 vs. 2 Argentina Yesterday at 6:00 PM
World Cup Iceland 1 vs. 2 Croatia Yesterday at 6:00 PM
What I'd like to see is, taking the Iceland v Croatia game as an example:
World Cup Iceland 1 vs. 2 Croatia Today at 11:00 AM
Thanks @manrajgrover! Really enjoying using the tool.
from football-cli.
@danoscarmike Thank you for looking into it!
Hope you're enjoying the world cup. :D
from football-cli.
Related Issues (20)
- Fix League Ids
- Development: Add instructions on how to setup development environment HOT 1
- Feature Request: Allow exporting output as JSON or CSV HOT 2
- Demos: Move demo gifs to svg based demos
- Fix JSDocs for the project
- League Standings table format HOT 3
- What does -d flag do? HOT 2
- Bug: Handle multiple standings response in League standings HOT 1
- Feature: Allow manually adding rare competitions HOT 1
- Feature: Show full detailed league standings
- Running watch on the command is returning unformatted output HOT 8
- SUGGESTION: Add MLS HOT 1
- Not able to see upcoming matches HOT 1
- Enhancement: Separate commands into modules. HOT 2
- sudo: football: command not found HOT 6
- Migrate project to V2 API HOT 1
- Add support for penalty scoreline HOT 1
- Add Fixtures /scores for the 2018/2019 season HOT 3
- Can't configure the program nor use it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from football-cli.