AustNet AustNet Archive Project — IRC Logs
« All channels | Contribute a log »

// #php — 2008-06-05

1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
01:43:19 Quit: schnootop ([email protected]) Quit: Leaving
01:51:23 Quit: fildo ([email protected]) EOF from client
01:55:54 Join: fildo ([email protected]) to #php
01:56:10 Quit: fildo ([email protected]) EOF from client
01:57:28 Join: fildo ([email protected]) to #php
03:46:41 Join: schnootop ([email protected]) to #php
04:52:59 Quit: teranoid ([email protected]) Ping timeout: 151 seconds
05:06:56 Join: teranoid ([email protected]) to #php
07:03:01 Join: smythe ([email protected]) to #php
07:03:02 Mode: (by ChanOP) +o smythe
08:55:49 Quit: Lukian ([email protected]) Ping timeout: 121 seconds
09:10:33 Join: Lukian ([email protected]) to #php
12:09:04 Quit: schnoodles ([email protected]) Ping timeout: 151 seconds
12:09:09 Join: schnoodles ([email protected]) to #php
13:40:32 Quit: Lukian ([email protected]) Ping timeout: 151 seconds
13:54:17 Join: Lukian ([email protected]) to #php
14:00:11 Quit: Lukian ([email protected]) Ping timeout: 121 seconds
14:17:52 Join: Lukian ([email protected]) to #php
14:22:51 Quit: Lukian ([email protected]) Ping timeout: 121 seconds
14:37:41 Join: Lukian ([email protected]) to #php
15:46:30 Quit: smythe ([email protected]) Quit:
15:53:34 Quit: Lukian ([email protected]) Ping timeout: 121 seconds
17:03:47 Join: paveway-3 ([email protected]) to #php
17:03:47 Quit: paveway ([email protected]) Connection reset by peer
17:04:45 Join: Lukian ([email protected]) to #php
17:07:53 Quit: paveway-3 ([email protected]) Connection reset by peer
17:08:39 Join: paveway ([email protected]) to #php
17:08:42 Mode: (by ChanOP) +o paveway
17:08:55 Quit: Lukian ([email protected]) Ping timeout: 121 seconds
17:23:37 Join: Lukian ([email protected]) to #php
17:49:16 Join: teza19 ([email protected]) to #php
17:50:44 <teza19> i need to know what im doing wrong.. im inserting"
17:50:47 <teza19> $time=time();
17:50:49 <teza19> $query = "INSERT INTO news VALUES ('','$name','$news','$user','$time')";
17:51:00 <teza19> what is the row value for time.
17:51:02 <teza19> is it timestamp?
17:51:19 <teranoid> I use datetime. Not sure if that's what you
17:51:21 <teranoid> re after--
17:51:40 <teranoid> er... date*
17:51:43 <teza19> i dont know what i used to use, it's old code
17:52:14 <teranoid> Depends what you're storing. Date + Time, I'm guess. So, datetime should be okay...
17:52:40 <teza19> Datetime outputs : January 1, 1970, 10:00 am
17:52:41 Quit: Lukian ([email protected]) Ping timeout: 121 seconds
17:52:46 <teza19> this is how im calling the value...
17:52:54 <teza19> '.date("F j, Y, g:i a", $when).'
17:53:08 <teza19> so i'm guessing it may be a timestamp?
17:54:33 <teza19> nope..
17:54:42 <teza19> it's so confusing, i dont know what to use
17:54:53 <teranoid> Hmm...
17:55:59 <teranoid> It's outputting literally as: June 5, 2008, 5:57 am
17:56:16 <teza19> it should
17:56:26 <teza19> but its not
17:56:35 <teza19> is there another way i can save the time/date
17:56:41 <teza19> and then display it accordingly
17:57:59 <teza19> maybe the way u do it?
17:59:05 <teranoid> Here's what I did:
17:59:21 <teranoid> $SubTime = date("y/m/d G:i:s");
17:59:21 <teranoid> and then inserted into a datetime field
17:59:27 <teza19> yerp
17:59:31 <teza19> how do u display it
18:01:13 <teranoid> heh, I just echo it :)
18:01:19 <teranoid> echo $row["SubTime"];
18:01:37 <teranoid> Outputs as (example of the latest addition): 2008-06-05 16:17:13
18:01:49 <teza19> yeah, i want a different set out
18:01:50 <teza19> :)
18:01:51 <teza19> lol
18:02:18 <teranoid> Another table I use only uses date. Output as: $date = date('l F d Y',strtotime($row['EpDate']));
18:02:34 <teza19> ah im not that advanced
18:02:35 <teza19> lol
18:02:43 <teranoid> Neither am I. Seriously =]
18:03:15 <teranoid> You should see this website's code. Friggen hideous! But, what can you do when you're a noob and your client keeps adding shit...
18:04:07 <teza19> lol
18:04:16 <teza19> ok i need to change the output
18:04:23 <teza19> so now.. my time will be:
18:04:30 <teza19> $time = date("y/m/d G:i:s");
18:04:46 <teza19> i changed the row to datetime?
18:05:01 <teranoid> Give it a shot, see how you go :
18:05:02 <teranoid> :)
18:06:04 <teza19> 2008-06-05 18:07:45
18:06:11 <teza19> works.. but how do i change the output
18:06:19 <teza19> lol
18:06:58 <teranoid> Yeah I just screwed with the subscriber list display. echo date('l F d Y',strtotime($row["SubTime"])); <<
18:07:26 Join: Lukian ([email protected]) to #php
18:07:37 <teranoid> Of course, change the output according to what you're setting out to achieve
18:08:01 <teza19> awesome
18:08:04 <teza19> thanks mate
18:08:14 <teranoid> np
18:08:26 <teranoid> A list of what you can output: http://au.php.net/date
18:08:33 <teranoid> er... formatting*
18:08:54 <teza19> yeah..
18:08:57 <teza19> but my time is wrong
18:09:01 <teza19> Thursday, June 05 2008 [ 12:00 am ]
18:09:03 <teza19> lol
18:09:24 <teranoid> Hmm... That's... kinda... weird-- Well, at least the date's right. You're halfway there!
18:09:47 <teza19> haha
18:10:31 <teza19> date('l, F d Y g:i a',strtotime($row["when"]))
18:11:20 <teza19> looks right?
18:11:43 <teranoid> Works for me :)
18:11:46 <teranoid> Thursday, June 05 2008 4:17 pm
18:11:59 <teranoid> (Latest subscriber, btw, not actual time)
18:12:07 <teza19> lol
18:12:13 <teza19> hmm
18:12:20 <teza19> and its not working for me, because?
18:12:38 <teranoid> Does it save into the database as 2008-06-05 16:17:13 ?
18:13:09 <teza19> got it
18:13:20 <teza19> date('l, F d Y g:i a',strtotime($when))
18:13:35 <teranoid> rgr
18:14:27 <teranoid> I swear, if I ever had to do an advanced php class, I'd fail the exam if I had to memorise the format codes...
18:15:04 Quit: Lukian ([email protected]) Operation timed out
18:18:01 <teza19> lol
18:30:38 Join: Lukian ([email protected]) to #php
18:41:06 Join: optimus ([email protected]) to #php
18:55:46 Quit: teza19 ([email protected]) Quit:
18:58:04 Quit: ChanOP ([email protected]) Service shutdown
19:49:30 Join: MedNez ([email protected]) to #php
20:03:47 Quit: Lukian ([email protected]) Ping timeout: 121 seconds
20:15:38 Quit: MedNez ([email protected]) Ping timeout: 121 seconds
20:18:28 Join: Lukian ([email protected]) to #php
20:25:02 Join: MedNez ([email protected]) to #php
20:31:49 <teranoid> robert_~~~
20:54:56 Nick: teranoid is now known as XIO
21:01:09 Join: ChanOP ([email protected]) to #php
21:01:09 Mode: (by ezehost.il.us.austnet.org) +o ChanOP
21:02:20 Nick: XIO is now known as teranoid
22:15:18 Quit: Lukian ([email protected]) Ping timeout: 121 seconds
22:16:06 Join: Lukian ([email protected]) to #php
22:58:00 Quit: MedNez ([email protected]) Client exited