Problems with unixtime!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Problems with unixtime!
# 1  
Old 01-12-2005
Question Problems with unixtime!

Hi, i have wrote a scripts thats connect too some tables in a phpBB community. I have got contact with all of the tables but becouse phpBB uses unixtime, it is showed wrong. 0312011557 (Wednesday, 12. january, 15.57). I ask on this page becouse it is a unixpage, sow I wonder i someone has a script that correct this erors in my script.

My script is her: http://www.tinemlarsson.1go.dk/forumet.php

Sorry for my bad English.Smilie
# 2  
Old 01-12-2005
well!
touch -t 200412312300 date.file
will give a file that has time stamp of dec 31st 11.00pm of last year (2004)
and touch -t 20050112157 date.file will a file (date.file) with a time stamp of jan 12th 11.57am of this year 2005. the first two numbers should be the century and the second two the year.. other wise you have s slight confusion between 1903 or 1905 and 2003 or 2005.
ans:2003 or 200501121157.
check out man date!
moxxx68
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Web Development

A simple UNIXtime component in Vue.js

A shout out to Scott who gave me a helping hand to turn a simple sample Vue.js app I wrote yesterday into a Vue.js component: Vue.component("unix-time", { template: `<div class="time">{{unixtime}}</div>`, data() { return { unixtime: "" }; }, methods: { ... (1 Reply)
Discussion started by: Neo
1 Replies

2. Shell Programming and Scripting

Multiple records need to convert UNIXtime to human readable datatime and all output in one format

Hello Experts, Below is the record i have: sample data attached I want this record of each row to be in single line and there are multiple rowise unixtime mentioned e.g 11996327 , This needs to be converted to Human readdable data and time from multiple rows Can you help me , it will be... (10 Replies)
Discussion started by: manishK
10 Replies

3. Shell Programming and Scripting

unixtime to formatted date time

Hi, I need to take the unix time and format it to a date/time string like this yyyymmdd,hhmmss I'm wrting in shell but have tried calling perl, but all the perl options I found on here puts output to Thu Jan 1 00:00:00 1970 format. Any help? Cheers Neil (4 Replies)
Discussion started by: nhatch
4 Replies

4. UNIX for Dummies Questions & Answers

Problems with IF Else ??!!

I have written the following code in cygwin to create directories in windows based on the parameter passed. echo $1 > fullpath path1=`awk -F / '{print $1}' $fullpath path2=`awk -F / '{print $2}' $fullpath if then if then if then continue ... (4 Replies)
Discussion started by: janardhanamk
4 Replies

5. Shell Programming and Scripting

Replace date_time to unixtime in csv.file

Hello, since hours I am trying to replace in a csv-file the date_time to unixtime. I tried sed, awk but not successful. I can not call a shell command within awk. Probably there is an easier way. Thanks in advance for your help Regards, telemi test.csv: 2010-04-22... (5 Replies)
Discussion started by: telemi
5 Replies

6. UNIX for Dummies Questions & Answers

Problems with using less

Hello, I am having problems with using less on Linux version 2.6.18-92.1.17.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)). I am using csh but have the same problems on bash. If I pipe something to less it works perfectly i.e. cat file | less... (9 Replies)
Discussion started by: z1dane
9 Replies

7. UNIX for Dummies Questions & Answers

problems with If

I'm having problems uses "if" it works fine when i do this. #!/bin/sh a= 10 qw= 2 w= 20 { if && ;then echo 3 fi } However if i try to do #!/bin/sh a= 10 (5 Replies)
Discussion started by: THM
5 Replies

8. UNIX for Advanced & Expert Users

converting localtime to unixtime

hi, how to convert the localtime to unixtime? i have date from the date command in unix i want to convert it into unixtime thnx (2 Replies)
Discussion started by: AshishK
2 Replies

9. UNIX for Dummies Questions & Answers

Problems with ld.so.1

I renamed ld.so.1 on a Sun machine running Solaris 2.6. Now I cannot boot the system and I can use only very few commands in Maintenance Mode. Can someone help me? (3 Replies)
Discussion started by: ciccio
3 Replies

10. UNIX for Advanced & Expert Users

'make' problems (compliation problems?)

I'm trying to compile and install both most recent version of 'make' and the most recent version of 'openssh' on my Sparc20. I've run into the following problems... and I don't know what they mean. Can someone please help me resolve these issues? I'm using the 'make' version that was... (5 Replies)
Discussion started by: xyyz
5 Replies
Login or Register to Ask a Question