[twitter-dev] Date and Time from created_at fromTwitter API in PHP

337 views
Skip to first unread message

giustin

unread,
May 22, 2010, 7:27:31 PM5/22/10
to Twitter Development Talk
Hi,

In PHP, I can get the formated date. Example:


$created_at = new DateTime($result->created_at);
$created_at = $created_at->format("Y-m-d");
echo $created_at.' - ';

Questions:

1) how to get the time like "hh:mm:ss" from the result->created_at?

2) how to get the time in a specified time-zone, like UTC-03 (Brazil)?

Thank you.

Bernd Stramm

unread,
May 22, 2010, 7:51:08 PM5/22/10
to twitter-deve...@googlegroups.com, tgi...@gmail.com
Have you considered the PHP manual, for example here

http://www.php.net/manual/en/function.date.php

>
> Thank you.



--
Bernd Stramm
<bernd....@gmail.com>

Reply all
Reply to author
Forward
0 new messages