time

Django TimeField Model without seconds

Greetings, I am trying to implement a TimeField model which only consists of HH:MM (ie 16:46) format, I know it is possible to format a regular Python time object but I am lost about how to manage this with Django. Cheers ...

Preventing "One Hours" "One MInutes" "One Days"

If my code looks like: if($seconds < 60) $interval = "$seconds seconds ago"; else if($seconds < 3600) $interval = floor($seconds / 60) . "minutes ago"; else if($seconds < 86400) $interval = floor($seconds / 3600) . "hours ago"; else $interval = floor($seconds / 86400) . "days ago"; How would I get rid...

Time validation (and comparing) using Javascript / JQuery

Hi guys, First of all apologise for creating my third Javascript question in as many days - I'm really trying to push myself in this field on this project, and feel my skills are developing at a fairly good rate thanks to my research and your fantastic help on here, particularly redsuqare!! I've got a table where people can enter times...

Php clock 2 hours back

So the clock is 18:37 right now in sweden but it prints out 16:37 why is that? $timestamp = time(); date('M d, H:i', $timestamp) What can be wrong? ...

intersect time intervals and generating new ones depending on intersect-results

hi there, i've got two tables with time intervals and some settings for each interval, eg 2009-01-01T06:00:00 2009-01-04T14:00:00 1 0 2009-01-04T22:00:00 2009-01-07T06:00:00 2 1 2009-01-07T06:00:00 2009-01-09T13:00:00 2 2 2009-01-09T22:00:00 2009-01-14T06:00:00 3 0 and 2009-01-04T16:00:00 2009-01-05T01:00:00 2 0 2009...

Can anyone see what is wrong with this (time related functions in C)

#include <stdio.h> #include <stdlib.h> #include <time.h> static struct tm createDate(unsigned day, unsigned mon, int year) { struct tm b = {0,0,0,day,mon-1,year-1900}; return b; } static int dateExceeded(unsigned day, unsigned mon, int year) { struct tm b = createDate(day,mon,year); time_t y = mktime(&b), now; tim...

calculate frequency on certain range

Hi, I have maths problem ... (at the moment i solved it using manual iteration which is pretty slow) ... For example if an employee got paid weekly (it can be fortnightly / every 2 weeks and monthly) with certain date (let's call the employee got paid every tuesday and for monthly the employee paid on certain date). I have date range...

C# Time Management Problem

I am trying to write a program that uses a timer, duration, start time and end time. In this program it has three screens. When I click start timer on one screen, the other two screens with a timer will automatically update itself. What I currently have is one screen running the timer with the other two screens showing 00:00:00, while t...

wordpress, cron & time - does time on server affects plugins? how to fix it?

I'm running wp on lamp install in virtual machine. I frequently pause it, save snapshots, etc. Date and time aren't correct because of this and i think i noticed weird behavior of plugins that use cron. How do i fix my time and plugins? Maybe i should get time from external location so it would be correct even though i regularly pause my...

Plot time data in R to various resolutions (to the minute, to the hour, to the second, etc.)

I have some data in CSV like: "Timestamp", "Count" "2009-07-20 16:30:45", 10 "2009-07-20 16:30:45", 15 "2009-07-20 16:30:46", 8 "2009-07-20 16:30:46", 6 "2009-07-20 16:30:46", 8 "2009-07-20 16:30:47", 20 I can read it into R using read.cvs. I'd like to plot: Number of entries per second, so: "2009-07-20 16:30:45", 2 "2009-07-20 16:...

Time zone list issue

For my application, I'm importing the calendar event from google calendar. The only problem which I'm facing is Time zone list. I'm getting the timezone as output from google calendar xml, which I have to check with time zone list and add time accordingly... so from where I can get this standard time zone list.. or some other alternati...

how to check for current date and time in Jquery

Just wondering if there was a way to check the current date and time in Jquery. ...

Working with datetime in Rails

How to properly extract a time only from the datetime object (post.created_at, to be precise) with/without the influence of TimeZone? How to extract the day, month, year? How to extract the day/month/year via a custom pattern (is it possible)? ...

What's the difference between DateTime and Time in Ruby?

And what factors would cause me to choose one or the other? ...

UTC and Daylight savings scenario.

I am using UTC to store data and time values in the DB. The values are converted to localtime on the client or per client timezone. I stepped on these scenarios from the MSDN article, where displaying the time from UTC seems to pose issues during daylight savings. Someone living on the east coast of the United States types in a val...

Data add query in sql table

How to add new data(multiple rows) in sql table without deleteing existing data. My table is id Location Name User ID LogDate LogTime 1 Mumbai Shanks 0001 11-Aug-09 15:15:20 1 Mumbai Shanks 0001 11-Aug-09 15:25:28 1 Mumbai Shanks 0001 11-Aug-09 16:35:56 2 Delhi Mahen 0002 11...

How to convert Oracle "TIME" to JDBC Time in query?

Oracle doesn't support the TIME datatype, but you can use DATE to store a TIME. My problem: select to_date('2009-06-30', 'YYYY-MM-DD') as "DATE", to_date('16:31:59', 'HH24:MI:SS') as "TIME" from dual yields: DATE TIME 2009-06-30 2009-08-01 when I run it through JDBC (in SQuirrel SQL, in fact). "2009-08-01" isn't a v...

Conversion from K2SEC or kSI2Ks to secs or mins

Hi, Since CPU's clock their cycles in kSI2Ks or K2SEC time units. I am wondering if some body know how to convert them in to seconds/minutes. Thanks, Omer ...

PHP Multiple Options

What is the easiest way to code in the values in fifteen minute increments? In other words, instead of doing the following: <select> <option value="">12:00 AM</option> <option value="">12:15 AM</option> <option value="">12:30 AM</option> <option value="">12:45 AM</option> ... so on How could I use PHP to take up less space? Thanks!...

Proof of Concept

I need to provide a proof of concept to my boss. Our application is written in WPF, but I know Windows Forms back to front. Acheiving the POC in WPF is taking 3-4 times as long as it would in windows forms. How would you go about this, either use WPF and get an ugly looking POC that takes thrice as long to create, or use windows forms a...