Comments (1)
Just realized that a nice way to handle this is to
- limit choice to an even hour. E.g. 4 AM not 4:44 AM
- whenever doing calculations for reporting purposes just have them run within a time zone that corresponds to the requested hour.
That is to say, if i'm in Eastern Standard Time and I set my "end/start of day" to 4 am then behind the scenes, and only for the purposes of finding day/week/month boundaries, change my time zone from GMT -5 (EST) to GMT -9 (AKST). Midnight AKST is 4AM EST. Once we've done that we can leverage all of Raku's built in day/month functionality without doing any funky math & custom day boundary calculations everywhere.
a simple example: hey log 3 days
- read in config for start/end of day
- see that it's 4 hours off and add +4 to current time zone.
- calculate the start of the day 3 days ago.
- get that as an epoch time.
(at this point we're done mucking with the fake time zone) - query the db for entries from that time forward
- pass the results on for reporting
user output works as it already does with the current time zone.
from hey_3.
Related Issues (20)
- [feature] hey nevermind should work on interruptions too
- [feature] projects should have a concept of archiving
- add ability to export log as json
- [bug] piping hey's log output results in broken pipe
- log sorts by id not by start time. HOT 1
- [feature] tab completion of projects and tags
- [feature] support single-timer-mode
- [bug] summary doesn't account for timer overlaps
- [feature] project should have default tags
- [feature] hey stop should ask which timer when multiple are running
- [bug] problems stopping specific timer
- Typo in interrupttracker.com description HOT 1
- Command name consistancy HOT 1
- slow startup time
- [feature] add hey kill project <name>
- Generating Data For Invoices
- better handling of ongoing timers
- [feature] enable deletion by id
- [bug] killing unknown things shows stack trace
- Dependency on Template6 HOT 1
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 hey_3.