Questions tagged [timestamp]

1

votes
2

answer
72

Views

Get the timestamp of user's last login in Jenkins

I am starting to auditi my jenkins users. How can I get the timestamp of user's last login in Jenkins? Groovy script example here (https://github.com/cloudbees/jenkins-scripts/blob/master/get-lastlogin-users.groovy) returns the last time user's granted authorities changed, not the timestamp of the l...
Joaquín
1

votes
1

answer
63

Views

JDBC asking timestamps from Sybase offset by an hour?

There is a database procedure (to which I do not have access to, so I can't view its source or edit it) in a Sybase database that I query for information about events, and those events have a start and end date. EDIT: This effect also happens when I queried a freshly-created table of just dates, cre...
Karbik
1

votes
1

answer
25

Views

how to convert unix timestamp to date+time for a given timzone

In JavaScript, I have unix timestamp, how do i convert it to data+time for any given timezone, regardless of the local timezone? I am especially interested in US/eastern
yigal
1

votes
3

answer
40

Views

How to SELECT all rows within a certain date/time range with a certain timestamp step size in MySQL?

I have a table that contains sensor data with a column timestamp that holds the unix timestamp of the time the sensor measurement has been taken. Now I would like to SELECT all measurements within a certain date/time range with a specific time step. I figured the first part out myself like you can s...
Henry
0

votes
0

answer
16

Views

How to retrieve data from firebase realtime database use timestamp?

this is my db structure : https://drive.google.com/open?id=15067yFPeeGoQH9kaagw6vxw-zoDFXmBN I want to retrieve data from the child 'nilai' based on time using timestamp, then enter it into the highchart, I am confused by the code, is my code correct? var startdate = 1552268459655; var enddate = 1...
sri dewi sartika
1

votes
3

answer
30

Views

Python getting hour from from timestamp

I need to classify timestamps based on the hour, for example if it is between 7 AM and 9 AM, it will be morning. I have timestamps that I take from my csv file and I need to get only hour so I can classify the number with if statements. I will take the timestamps from date column and create a new co...
S.Shiro
0

votes
2

answer
18

Views

Select data between night and day hours

My data looks like this, it is a minute based data for 2 years. 2017-04-02 00:00:00 2017-04-02 00:01:00 2017-04-02 00:02:00 2017-04-02 00:03:00 2017-04-02 00:04:00 .... 2017-04-02 23:59:00 ... 2019-02-01 22:54:00 2019-02-01 22:55:00 2019-02-01 22:56:00 2019-02-01 22:57:00 2019-02-01 22:58:00 2019...
Suhas Raju
1

votes
3

answer
2.4k

Views

Sequelize createdAt and updatedAt timestamps are wrong

I created a table with timestamps using sequelize. when I am updating the table, it automatically updates the timestamp (i.e createdAt and updatedAt). but these times are different from my local time. I have attached herewith 2 screenshots with the model script if I use moment to convert timezone li...
Roledenez
1

votes
1

answer
2.1k

Views

changing the format of timestamp in python

I am trying to change the timestamp from one format to another. I tried some approaches but i am not able to succeed. This is my timestamp 151005-12:07:34.917928 I would like to change it to a format like this 2015-10-05 12:07:34:917928 Thanks in Advance
Rajesh
0

votes
0

answer
5

Views

Flutter issue: type 'Timestamp' is not a subtype of type 'DateTime'

I'm looking for some help for an app my team and I are working on. We are facing the following problem for weeks : flutter type 'Timestamp' is not a subtype of type 'DateTime' We want to get these user data from Cloud Firestore: birth [DateTime] gender [String] license [DateTime] name [String] size...
Barracud Apps
1

votes
1

answer
519

Views

Add 10 minutes to the current timestamp in java with clipping milliseconds not working

I have the following code for finding the current timestamp in java public static java.sql.Timestamp getCurrentJavaSqlTimestamp() { java.util.Date date = new java.util.Date(); return new java.sql.Timestamp(date.getTime()); } And I call it using: java.sql.Timestamp timestamp = getCurrentJavaSqlTimest...
Santhucool
1

votes
3

answer
706

Views

Bash touch - illegal option -d

Yesterday I took a bunch of pictures but I forgot to change the timezone in my camera. Now all pictures have wrong modification date. I want to change modification date of all files in a specific directory to minus 10 hours. #!/bin/sh for i in /Users/slick/Desktop/100D5200/*; do touch -r '$i' -d '-1...
Matt Komarnicki
1

votes
1

answer
56

Views

pandas time stamp correction

I have 2 time-series files I wanted to merge both. I can do the merging but the real issue is the Format of timestamp in both files. First file: '2014-12-14 00:10:00' Second file: '3/30/2015 8:30' I'd prefer to go with second file time stamp format. When I tried to merge I'm getting below error (of...
Babu
1

votes
2

answer
1.8k

Views

Python datetime.timestamp() issue

I find the datetime.timestamp() function return different value on Linux and Windows. Here is a simple to to replicate it: from datetime import date, time, datetime, timedelta def main(): dt = datetime(2000, 1, 1) edt = datetime(2006, 12, 31) fname = 't1.csv' f = open(fname, 'w') f.write('date,time...
fivelements
1

votes
1

answer
153

Views

Simple BASH script needed: moving and renaming files

Decades ago I was a programmer (IBM assembly, Fortran, COBOL, MS DOS scripting, a bit of Visual Basic.) Thus I'm familiar with the generalities of IF-Then-Else, For loops, etc. However, I'm now needing to delve into Bash for my current job, and I'm having a difficult time with syntax and appropriat...
Saguaro
1

votes
1

answer
84

Views

Unexpected result when converting datetime(1970,1,1) to seconds

In Python 3.5, when I convert POSIX origin 1970-01-01 to timestamp (in seconds) instead of 0 I get the following result: import datetime as dt t = dt.datetime(1970,1,1) t.timestamp() -10800.0 Expected 0 is produced by: t = dt.datetime(1970,1,1,3) t.timestamp() 0.0 Both results are quite unexpected t...
Sergey Bushmanov
1

votes
2

answer
211

Views

Comparing two timestamps from mysql

I have two datetime variables retrieved from mysql. one is equal to 'now()' and the other represents the last time a row was changed. I need to compare these two datetime values to get the difference between the two. This is what i was attempting (my reading in from Mysql is handled by a bespoke web...
John
1

votes
4

answer
307

Views

Converting gmail timestamp to strptime

I have this readout Tue, 19 Jan 2016 16:12:18 -0800 (PST) I'm storing emails in mongo and I'd like to convert this into a python time object so I can query Mongo based on time of the email. What is the best way to do this? Thanks!
Morgan Allen
1

votes
1

answer
500

Views

date shown in database as 0000-00-00

Date shown in mysql database as 0000-00-00 when the data type is 'date', but when the data type is 'varchar(160)', it shown as 1454803200, now how I can get the correct date format as 'Monday 01 Feb 2016'? Here I have used php code 'INSERT INTO' to write into the table of the database.
Bulbul Anwar
1

votes
1

answer
57

Views

timestamp off by minutes

This one's got me flummoxed. I've got a little mysql file holding users' last logins. One of the fields is date_time. It correctly holds the date_time. (Example: 2016-02-10 13:15:59 ) When I fish the date_time back out, however, the time is off, usually pointing to the next hour with the minutes...
Mffffffffffffff
1

votes
1

answer
2.2k

Views

Convert hexadecimal value to timestamp/date and time

Hi I have hexadecimal string of time stamp generated by MSC (is a neighbouring base stations keeps a record of the location of the mobile subscribers). Now I want to convert hexadecimal string to human readable date and time. I tried as follows but I'm not able to convert: String s = '1508221325112B...
Rajesh Hatwar
1

votes
1

answer
51

Views

can not get timestamp value inserted in my database table

i have a column called 'joined' in my database 'users' table which i have created using migration Schema::create('users',function(Blueprint $table){ $table->increments('user_id'); $table->string('username',100); $table->string('password',300); $table->string('full_name',100); $table->string('email',...
AL-zami
1

votes
2

answer
789

Views

Javascript - reformat date string to ISO8601

I have a string like this: 21.03.2016 23:59 And I need this string converted into a ISO-8601 date-time string: YYYY-MM-DDTHH:mm:ss+00:00 Is there a simple way to convert this date? I try it whit moment.js but i can't find a function to parse an existing date.
rockZ
1

votes
1

answer
539

Views

how print timestamp in ASP.net

I have in SQl Server table with col timestamp. Now i use Entity Framework 6, and get in model field byte[]. Now what I should do to save current date to this field, and what i should do to print in view this date like(dd/mm/yyyy hh/mm/ss) I find this: How to convert byte array (SQL-server Timestamp)...
Mateusz
1

votes
1

answer
613

Views

How to parse UTC time stamp and convert into another format in java

Hi i have UTC time stamp and i need parse to convert it into IST format I use to receive UTC time stamp from MSC (Telecom base station) in the form of string : 1307261822062B0530 and it can be divide as bellow 13 07 26 18 22 06 2B 05 30 yy = 13 MM = 07 DD = 26 hh = 18 mm = 22 ss =...
Rajesh Hatwar
1

votes
1

answer
932

Views

Timestamp in XML Schema

I'm creating an XML schema, where some of the elements should have the timestamp format from sql. There is no type in XML schema that completely correlates, so how can I best achieve this? XML has dateTime, but it's not in the same format.
user16655
1

votes
1

answer
365

Views

difference of days between unix timestamps in r

I have two columns of Unix timestamps as below and my code doesn't work here. Just wondering what is the right way calculate the difference of days(Measure_Time$duration) between these two timestamp? Appreciate your help! Measure_Time
D Jay
1

votes
1

answer
1.2k

Views

How to convert an ISO 8601 formatted date into a timestamp with jQuery?

I have a time string in this format - 2015-09-17T16:00:00. How do I convert it to a timestamp format like this - 1447804800000 using Javascript/jQuery?
Kemat Rochi
1

votes
2

answer
671

Views

Formating NSDate to YYYYMMDDHHMMSS.XXX [gmt offset[:tz name]]

I am trying to create a date looks like this: 19961005132200.124[-5:EST] Here is what I am trying: + (NSString *)getDate { NSDateFormatter* df = [[NSDateFormatter alloc] init]; [df setDateFormat:@'YYYYMMDDHHMMSS.000[ZZ:zzz]']; NSTimeZone *gmt = [NSTimeZone timeZoneWithAbbreviation:@'GMT']; [df setTi...
iMacHumphries
1

votes
1

answer
45

Views

how to check if a value is modified from the last time (UPDATE -INSERT) in Cassandra

if UPDATE USING Timestamp is the answer, then how does it work? How can I get the current timestamp value to know if has been modified or not?
Housekl
1

votes
1

answer
1.1k

Views

Converting ISO 8601 to Unix using moment.js, but the offset isn't being taken in to account

I've read the documentation as best as I can but cannot work this out. I have a date/time I'm getting from Bootstrap DateTime Picker that is an ISO 8601 string like this: 2016-04-01T22:00:00+01:00 That string is the result of picking the 1st of April at 10pm in the date/time picker. I want to conver...
Sean
1

votes
2

answer
45

Views

Get time interval between stop (row x) and start (row x+1)

I have a table in PostgreSQL 9.5 with two timestamps in each row, timestampstart and timestampstop. CREATE TABLE routes( ID serial PRIMARY KEY, TIMESTAMPSTART timestamp default NULL, TIMESTAMPEND timestamp default NULL ); Now I don´t want to calculate the interval between start and stop, but betwee...
Martin
1

votes
1

answer
81

Views

How to capture logs which are one hour old or less

I have to make a shell script such that each time it is executed it goes to the log file which is common and gets updated. What is already being done is pick all the erroneous logs and show as output. But now I want this to be like it picks logs which is certain minutes older and no more. grep is go...
Preeti Maurya
1

votes
1

answer
1k

Views

How to decode timestamp from digital PKCS7 signature?

I have a signature with timestamp. I am trying to decode the timestamp and decode its properties. var contentInfo = new ContentInfo(Convert.FromBase64String(data)); var signedCms = new SignedCms(contentInfo, true); signedCms.Decode(Convert.FromBase64String(signature)); signedCms.CheckSignature(true)...
VoimiX
1

votes
1

answer
64

Views

Python timedelta error: skipping a day when trying to get tomorrow

I have the following code: import time from datetime import date, datetime, timedelta def getNextDay(last_day): #Returns tomorrows timestamp at two times: 00:00 and 23:59 last_day = datetime.utcfromtimestamp(last_day) tomorrow = last_day + timedelta(days=1) tomorrow_start = datetime(tomorrow.year, t...
Joab Mendes
1

votes
2

answer
306

Views

Get a unix timestamp in a specific timezone

I'm currently trying to get the timestamp of the date_default_timezone_set('Europe/Berlin'); as unix timestamp, but it always results in a UTC unix timestamp. // Current time: '2016-04-28 20:37:20' date_default_timezone_set('Europe/Berlin'); echo date('Y-m-d H:i:s'); // -> '2016-04-28 20:37:20' echo...
FireEmerald
1

votes
2

answer
700

Views

How to specify “Date with timestamp” format in Text File Input step of Pentaho?

I have timestamp like 2016-04-04T01:00:11Z Could someone please tell me how to specify the format for this timestamp in Text File Input step of Pentaho? I tried with yyyy-MM-ddThh:mm:ssZ and yyyy-MM-dd hh:mm:ssZ but either doesn't work.
Akshay Lokur
1

votes
1

answer
28

Views

How can I set UNIX_TIMESTAMP correctly on my local?

I have a table which has a column named date_time. It is containing a unix number of the time. Something like this: // mytable +----+------------+ | id | date_time | +----+------------+ | 1 | 1464499385 | -- 19 days ago +----+------------+ -- ^ these are based on current time w...
Martin AJ
1

votes
2

answer
365

Views

Java code to check if event timestamp falls in weekdays and business hours from 9:30 AM to 4:00 PM

What is the best way in Java to check if event timestamp falls in weekdays and business hours from 9:30 AM to 4:00 PM and name the variable like Event_Type = 'business' or 'non business' based on the comparison. 1) Time stamps are Unix Time stamps. 2) Time zone differences are not a concern as all e...
RAJESH
1

votes
1

answer
141

Views

A MySql query for returning time which is greater than 22:00 and smaller than 06:00 for group of different timestamps

I'm developing a working time registrator and I'm wondering if anybody has a simple solution for selecting 'night hours' from array of timestamps, which represents the start and end of working (of course this could be overnight). Example timestamps: SELECT start, end FROM work start...
marc_s

View additional questions