Questions tagged [gettime]

Use for questions related to the 'gettime' method, for getting the time in JavaScript.

The getTime() method returns the numeric value corresponding to the time for the specified date according to universal time.

You can use this method to help assign a date and time to another Date object. This method is functionally equivalent to the valueOf() method.

Read more in the ref.

128 questions
0
votes
1 answer

Twitter Bootstrap Calendar - work out minutes bug

I am using the Twtitter Bootstrap Calendar and have an issue with the code they have provided. It's within the Modal overlay to display an event details. Specifically the issue is that the working out of the event start and end times is not showing…
dubbs
  • 1,027
  • 1
  • 11
  • 30
0
votes
0 answers

Highcharts: Trouble using GROUP BY date in chart

I have a line chart that works fine with the following query: SELECT peakdate, peakusage FROM peaktable WHERE peakDate BETWEEN '#arguments.dtBegin#' AND '#arguments.dtEnd#' ORDER BY peakdate The date output looks something like:…
Water Monkey
  • 73
  • 1
  • 1
  • 3
0
votes
1 answer

getTime( ) Javascript

I have a php date, and i want the difference about php date and today's date. The code is: function countdown(counter, year, month, day, hour, minute, second){ var datePhp = new Date(year, month, day, hour, minute, second); var…
mjosee7
  • 33
  • 5
0
votes
1 answer

Android trying to display GPS getTime() result is crashing the app

I'm building an Android app using GPS localization, and for that purpose I need first to display localization parameters like speed, time of last fix, deltatime, distance, an so on. No problem with speed, but as soon as I try to display the…
0
votes
1 answer

Getting Arizona time with getTime()

date= Calendar.getInstance(); Date currentDate = date.getTime(); String sDate = currentDate.toString(); This returns time EST. I need to change it to Arizona time which is tricky because Arizona does not have daylight savings time. Is there a…
Aaron
  • 3,790
  • 11
  • 69
  • 121
0
votes
1 answer

Timeval struct usage

I needed to calculate the time it takes to run a certain function and ran into the following code,record & output the execution time of a piece of code in nanoseconds And also is there any difference between struct timeval timer_spent & timeval…
Siva
  • 141
  • 1
  • 12
0
votes
1 answer

Javascript new date(str).getTime() not working for IST

I am getting the time stamp from a server in following format "Wed Jan 15 14:17:06 PST 2014" or "Wed Jan 15 14:17:06 IST 2014" when I am doing getTime on second timestamp having IST I am getting NaN . Please take a look below: when I do: …
druveen
  • 1,695
  • 3
  • 13
  • 29
0
votes
2 answers

Issue with timer function using get time function

I'm trying to use getTime to set a timer for an image gallery. When I add an alert during the else block of imageWait() this function works perfectly but without the alert nothing happens. Any ideas why? milliseconds=null; galleryLoop(); function…
Jesse
  • 3
  • 2
0
votes
1 answer

Can't use clock_gettime() in VxWorks RTP application

Here's the code which is built into a static user library call log.a. This builds fine. #include void logSomething() { .... struct timespec tp; clock_gettime(CLOCK_REALTIME, &tp); timeStamp = tp; //log some…
0
votes
1 answer

Native Client - how can I use GetTime?

I am fairly new to NaCl and trying to port a successful application from C++ Visual Stidio. I want to get the time and my code has the following statement: PP_Time mytime = PPB_Core::GetTime(); but the compiler does not like this giving the…
0
votes
1 answer

Converting a .getTime value for from date to Calender date of the format YYYY-MM-DD

I am trying to convert a .getTime date/value back to a format of the form YYY-MM-DD. Any help on this please? Currently I am populating my text From date with a value 2013-05-23. the .getTime value for this is 1371970800000 I then want to increment…
user1971376
  • 45
  • 1
  • 4
  • 10
0
votes
1 answer

creating an array of dates as milliseconds from select options as "YYYY, M, D"

I have a select menu with options looking something like this... I want to create an array of the dates from this menu but as milliseconds so I need something like: myArray = [1368140400000,...…
Tom
  • 11,826
  • 45
  • 133
  • 227
0
votes
1 answer

How to filter rows in database

I have a small line of code here... if(todaysDate!==date_encoded_time){ str +='
'+recipe_arr[x].recipe_name+''+'
'; }else { str +='
'+recipe_arr[x].recipe_name+'NEW…
ninpot18
  • 129
  • 1
  • 6
  • 16
0
votes
2 answers

Initializing a repetitive action with Javascript with getTime()

I'm a newb to development, so this may come off as a stupid question, but I figured I'd ask anyway. After all, me looking bad just makes you look better. :) I want to change the css style on an element based on time. I've tried a few different…
Dom Ramirez
  • 1,852
  • 2
  • 22
  • 29
-1
votes
4 answers

JavaScript needed in determining seconds elapsed in current year starting Jan 01 at 00:00

I am newbee in JavaScript and i am having toughtime calculating seconds elapsed in current year not from 1970 as JavaScript default method calculates. Basically i need to develop script which will show countup timer of products produced in current…
1 2 3
8
9