# Tagged Questions

The tag has no usage guidance.

1answer
32 views

### Time complexity Computation

What will be the result of the time complexity of this piece of code i.e. int sum(int A[], int n) { int sum = 0, i; for(i = 0; i < n; i++) { sum = sum + A[i]; } ...
3answers
140 views

### Data from devices with unreliable clocks

Are there any viable approaches to dealing with data coming from devices with unreliable clocks? We have a database system running on a central server. The latest addition to the system is a bunch of ...
1answer
71 views

### Designing Storage for Different Time Systems

I've been considering doing some kind of application that allows users to track events in mythical settings. However, not all mythical settings allow for normal times. What if one user wants star ...
1answer
64 views

### What is an element of a schedule called? [closed]

I have a question about software modeling terminology, when modeling time. Say you have a repeating schedule MWF 4-5 p.m. What do you call Monday 4-5 p.m.? What's the term for that? using System; ...
2answers
197 views

### Which timezone is used for permalinks of posts [closed]

I wanted to add timezone support to my blog app but got stuck with a design problem. Every post has a published_on field which stores the publication date in a timezone aware format (UTC converted to ...
1answer
64 views

### Prove complexity for a generic algorithm

I'm new to theory of complexity and am trying to prove a fact. So, let's consider an algorithm T that receive at input an integer n. That algorithm has a time complexity for n = 1 : θ(1) and for n > ...
0answers
24 views

### Realtime layered time data storage and calculations

I am having a hard time trying to figure out the best way to report on and calculate layered time data. The problem: A person can sign in multiple times, during this sign in there are multiple ...
2answers
165 views

### Does Time Complexity analysis factor for cache performance of an algorithm?

If I have an algorithm A. and it has fewer instructions than algorithm B. but performs worse on a CPU due to poor memory coalescing (and hence, poor CPU cache performance), does that factor into the ...
3answers
155 views

### Temporary Variables or Not: Choose CPU Time or RAM? [duplicate]

In a case where multiple variables are set equal to an operation using the result of an other operation, is it best to create a temporary variable for the result of the second operation (this would ...
1answer
176 views

### What is time complexity of update in binary heap?

For a binary heap we have O(log(n)) for insert, O(log(n)) for delete min and heap construction can be done in O(n). In the context of using a binary heap in Djikstra, my exam paper involved an "...
4answers
1k views

### Should a REST API be able to convert datetime to appropriate clients timezone?

Whilst implementing our API, the issue of datetime and timezones came up. All dates are normalized to UTC in the database. Currently, in the non-API application, all datetimes are converted based on ...
1answer
261 views

### Ever-running timed tasks

I need to design a piece of software which is invoking some actions regularly. By regularly I mean that there is x things that need to be done at 12.00, y things at 12.30 etc,etc. The times and ...
1answer
310 views

### Tracking hours with clock in/out

I am working on a web interface that would allow the user to keep track of the amount of time people spend at their establishment. The problem: I don't know what the best way to keep track of this ...
1answer
215 views

### Where does Rails get its datetime for creating records?

I have a rails app with a data model called 'jobs' and I'm faced with a critical design choice crossroads. I don't know enough about Rails and its inner workings to be able to say for sure what I ...
3answers
115 views

### What is an accepted method of timestamping in a distributed system?

In a normal application, a simple call to time.Now() in most languages will suffice for getting a timestamp, but what about in a web application spread over multiple servers? As I understand it time....
1answer
391 views

### Why do browsers clamp timeouts and intervals?

I've been working on some abstractions of setTimeout and setInterval in order to process large sets of data without blocking the event loop in the browser. Upon this, I have discovered that browsers "...
1answer
5k views

### When passing dates/datetimes as url parameters in an API, which format is better - unix timestamp or date string (ISO 8601) [closed]

Interesting question came up at work in regards to the better format of passing a date/datetime as a url parameter in an API: Is it better to pass as a unix timestamp, or as a plaintext date string (...
2answers
946 views

### How to make a legacy system time-zone sensitive?

I need to implement time zones in a very large and old Delphi system, where there's a central SQL Server database and possibly hundreds of client installations around the world in different time zones....
6answers
3k views

### Is there a constant for “end of time”?

For some systems, the time value 9999-12-31 is used as the "end of time" as the end of the time that the computer can calculate. But what if it changes? Wouldn't it be better to define this time as a ...
3answers
207 views

### How was the system clock first used in early computers?

This question is about the clock that keeps current time, not about the signal that sequences the circuitry (the wall clock, not the metronome). First computers were pure calculators, just very large,...
3answers
8k views

### How to visualize timer functionality in sequence diagram?

I am developing software for communication with external device through serial port. To better understand the new functionality I am trying to display it in sequence diagram. Flow of events is as ...
2answers
435 views

### how to deal with different formats of 'time/date format'?

Different systems accepts different formats of formating time. E.g. java, jquery: yyyy-MM-dd HH:mm some jquery plugins: yy-mm-dd HH:MM momentjs: YYYY-MM-DD HH:mm ISO-8601: YYYY-MM-DD hh:mm etc On ...
1answer
1k views

### Noda Time vs Joda Time?

In the Noda Time User's Guide, the rationale section states: the public API has been largely rewritten, both to provide an API which is more idiomatic for .NET, and also to rectify some of the ...
3answers
373 views

### How much time should you allow for clock skew?

We are writing a B2B application that uses OAuth 2.0. Before a token expires we want to refresh it since it faster to refresh a token, than request a new one. However, we want to build in some ...
2answers
138 views

### Bucketing model by time

I have a model which has timestamped entities. Now I want to do bucketing - "buckets" of entities which can be reasoned about a single entity. Also I want to be able to access related entities from a ...
1answer
97 views

### Running time question

I have an array A of n integers, sorted from min to max, and two numbers a<=b, which are known to be in A. I would like to write a pseudo-code for a procedure whose running time is c1+c2log(n) and ...
2answers
2k views

### Is a day really 24 hours long? [closed]

I asked this question on Stack Overflow and it was closed as off-topic. I'll ask it here hoping it will do better. This might sound silly, but bear with me. I've been working a lot with intervals and ...
1answer
112 views

### What does this duration reported by ffmpeg mean? [closed]

When I run ffmpeg on an mp4 file, it says the duration is: 00:03:57.54 What is the unit that 54 represents ? I am interpreting it as 0.0054 seconds (54 milliseconds).
4answers
198 views

### When to store Date/DateTime?

I'm working on a social network website and I'm not quite sure when I should store the date/datetime. The service includes some of the following events: Register/Login Follow "Like" (images & ...
0answers
132 views

### Representation of time expanded graph

I want to build a time expanded graph with time discretization Dt that starts at t = 0 and ends at t = T where between the node (n1, t) and the node (n2, t') is an arc if and only if (n1, n2) were ...
1answer
135 views

### Date & time - apply current, or 'then' DST?

I'm designing a function that given a UTC timestamp will convert it to the local time. The question I have, should the current times DST settings be applied to the conversion, or the timestamps DST ...
2answers
124 views

### Sending exactly one notification n seconds after the event

I have a system that checks the status of a number of systems, such as, is http up, does the system respond to ping, that sort of thing. I check all of these systems every 5 minutes. If something is ...
2answers
4k views

### What is the best practice for saving TimeZones in the database?

We want to start collecting timezones for each of our addresses in the database. What is the best practice to store the timezones? How would you go about acquiring timezones for the existing address ...
2answers
3k views

### Algorithm for finding overlapping times

Part of our ERP system is a sub-system for running background jobs. We track a variety of meta-data about our jobs in a table including timestamps for submitted, started, and end times. I'm creating ...
4answers
890 views

### (Dis)advantages of datetime vs. long in globally used applications [closed]

I am currently designing a web/mobile application the bulk of whose users will be distributed across the different U.S. time zones with a potential of scaling up to other countries and time zones as ...
2answers
243 views

### How to handle timezone for dates?

With a YYYY-MM-DD HH:MM:SS date I always store the UTC time. When I pull to display I translate timezones with built-in PHP functions and classes. I believe that is one correct way to do it and it ...
3answers
656 views

### Is the addition of a duration to a date-time defined in ISO 8601?

I've writing a date-time library, and need to implement the addition of a duration to a date-time. If I add a 1 month duration: P1M to the 31st March 2012: 2012-03-31, does the standard define what ...
3answers
3k views

### How is time calculation performed by a computer?

I need to add a certain feature to a module in a given project regarding time calculation. For this specific case I'm using Java and reading through the documentation of the Date class I found out the ...
2answers
3k views

### How should I deal with Time Zones in a .NET WCF application?

Our company runs a SaaS application where users log in from across the world (although mostly in the US). We store all our time relevant information as UTC, but we need to display times using local ...
3answers
1k views

### Unit testing time-bound code

I'm currently working on an application that does a lot of time-bound operations. That is, based on long now = System.currentTimeMillis();, and combined with an scheduler, it will calculate periods of ...
1answer
537 views

### Grouping numbers to minimize group-means

I need to find a way or an algorithm that groups members of a given data set (of positive integers) so that the difference between group means is minimized (not maximized, as usual). There are two ...
3answers
860 views

### timers with threads on queue

So I've been asking the wrong questions for the last three days and after searching a lot I think I have an idea of what I need, my question is how to use timers with two threads writing and reading ...
12answers
3k views

### isn't number localization just unnecessary?

I've just read this page http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx One of the things they did was to convert the arabic date to the arabic ...
10answers
2k views

### How to start and maintain an after-work project

I work as a full time developer. My workplace, however, is very limiting in the technologies and programming languages I can use. All of the work is done in C++. It is clear that C++ is rapidly ...
2answers
219 views

### Articles and Works by Developers [closed]

When I'm coming to home after the work, there left about 2-3 hours to work on my own projects. Some good programmers/developers also write books/articles/etc. I'm getting angry of to little time and ...
8answers
655 views

### Quality vs Time

I have heard of developers who work with code which is a complete mess because originally the code was quickly developed and the quality was not there in the first place. Its always good to get ...
11answers
7k views

### What amount of time should be spent on bugs vs original development? [closed]

This question is a little abstract but I'm hoping someone can point me in the right direction. My question is what amount of time can one expect to devote to a software project's bugs in relation to ...
11answers
2k views

### What to do when time estimation goes wrong?

Let’s say you estimated time for a case to be 3 days. In day two you notice that the case is growing and new scenarios are popping up which were not counted when the time estimation where done. The ...
5answers
661 views

### Is web application startup time really that important?

Had a conversation with someone about adding some initialization code on application startup and he complained about that causing an increasing in the startup time. He couldn't really state a reason (...
6answers
5k views

### how much time do you spend on Unit testing?

In a company I used to work for, executives insisted that the code coverage with unit tests must be 99% or more. This resulted in writing more tests than code. It took us literally 3 days to write ...