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.

142 questions
0
votes
1 answer

eglibc: Getting Uptime in Milliseconds

I want to write a log-output with the same format as the kernel-log: [ 11.947248] fsl-gianfar ffe24000.ethernet eth0: Link is Up The timestamp should have the same time-reference as the kernel time. This means, when a log-message is emitted at…
Charly
  • 1,270
  • 19
  • 42
0
votes
1 answer

Change timezone in javascript

I'm working on a little project for a small business website and I found a helpful tutorial for a script. The script will show an open or closed sign depending on the current time I changed a couple of things but now it's working just fine, except…
0
votes
0 answers

Measuring time of a context switch using clock_gettime()

I am trying to measure the average time of a context switch using threads and pipes, however when I use clock_gettime() I get an "undefined reference to clock_gettime()" even though I believe I have the appropriate header files. What the program is…
KoolaidLips
  • 247
  • 1
  • 8
  • 20
0
votes
2 answers

JAVA comparing just Times (getTime function)

I have REPORTDATE field where I want to take the value just of the hours and minutes. reportdate.getTime() returns this for example: 1439967368798 I want to compare if TIME from reportdate (hours and minutes) are between: if reportdate>=06:45 and…
Veljko
  • 1,708
  • 12
  • 40
  • 80
0
votes
1 answer

C# Timed Messages from a server restart

private void WorkerThread() { AppConsole.Log("Restarter Worker Thread Started", ConsoleColor.Green); DateTime nextRestart = GetRestartTime(); //--- Fetch next restart AppConsole.Log(String.Format("Selected next…
Matt
  • 1
  • 1
0
votes
1 answer

How to convert java time to .net time in Android?

I'm an Android developer and i'm having an issue about getting time with .Net "since 12:00:00 midnight, January 1, 0001 (0:00:00 UTC on January 1, 0001, in the Gregorian calendar)". How can i convert java getTimeInMillis() to .Net time value? Thank…
Steve Luck
  • 173
  • 1
  • 12
0
votes
2 answers

JavaScript Date mismatch after being stored as string

I cannot figure out why ls_a === a is returning false in the code below. It seems like when I convert to a date to string and back to date, something is being lost, but what?? JSFiddle: http://jsfiddle.net/s6accbax/ var a = new…
Justin
  • 26,443
  • 16
  • 111
  • 128
0
votes
1 answer

Set GETDATE() when an UPDATE WHERE is dynamic

I have a table named Stored_Procedure_Logging where I store the logging of my stored procedure. SPD_name Start_process End_process SPD_MySpd 2015-04-09 18:06:50 NULL The first script will insert the Start time by this…
Skandar
  • 3
  • 1
  • 4
0
votes
1 answer

iOS safari getTime() DST behaviour

i came across a strange behaviour of iOS 8.2 safari while converting datetime strings to unix ms timestamps during DST transition. Let's say we have js code function date2unix(dates){ var len = dates.length; var result = [], arr; while(len--)…
TauWich
  • 885
  • 1
  • 8
  • 9
0
votes
0 answers

Java calendar object date time interpretation?

I've an application that uses java.util.Calendar object. I do multiple set on the calendar object and also based on certain conditions. However, at the end of it all the last calculated date/time value appears different. I then figured out the…
0
votes
1 answer

Time Between two keyboard inputs in two sets

It is hard to explain why, but I will try to explain what. Lets say this is speed tapping on keyboard. The faster you tap between two keys the higher your score will be (last part not implemented jet). Also It its better when you tap both keys one…
andris
  • 99
  • 4
  • 13
0
votes
1 answer

Adding time zone hours difference to time

I know there's a much better and correct way to do it, but i need a temporarily solutions. I need to add in extra hours to the time, and the day will change automatically too. How should I change the code below? package { public class getTime { …
Hwang
  • 502
  • 1
  • 12
  • 32
0
votes
1 answer

Why is this javascript showing negative numbers with getTime function?

I can't figure it out, hope there is a simple solution but I can't see where is this script failing. This script is a part from a wp plugin, but where it fails there is no wp code. what it does is count to an end date and print it on screen. The…
JBoY
  • 51
  • 3
  • 13
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,167
  • 2
  • 13
  • 34
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
  • 93
  • 1
  • 1
  • 3