Create post with concrete date ignores passed date, posted as NOW.

67 views
Skip to first unread message

Дмитрий Николаев

unread,
May 8, 2013, 10:17:00 AM5/8/13
to tumbl...@googlegroups.com
Hi,

Seems you have some trouble, since using new API posting with date is ignored: post always posted with NOW() time. I've tried many date formatting variants: 
yyyy-MM-dd'T'HH:mm
yyyy-MM-dd HH:mm:ss GMT
yyyy-MM-dd HH:mm:ss

Always nothing works. Passes as string. 

John Crepezzi

unread,
May 8, 2013, 10:32:39 AM5/8/13
to tumbl...@googlegroups.com
This works for me, here is an example utilizing the Ruby client:

``` ruby
client = Tumblr::Client.new
new_post_id = client.text('yourbloghere.tumblr.com', :body => 'hello', :date => '2012-01-01 00:00:00')['id']
client.posts('apeyes.tumblr.com', :id => new_post_id)['posts'].first['date'] # "2012-01-01 05:00:00 GMT"
```

Hope this helps
JC


--
You received this message because you are subscribed to the Google Groups "Tumblr API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tumblr-api+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Crepezzi

unread,
May 8, 2013, 10:33:39 AM5/8/13
to tumbl...@googlegroups.com
corrected blog name typo:

``` ruby
client = Tumblr::Client.new
new_post_id = client.text('yourbloghere.tumblr.com', :body => 'hello', :date => '2012-01-01 00:00:00')['id']
client.posts('yourbloghere.tumblr.com', :id => new_post_id)['posts'].first['date'] # "2012-01-01 05:00:00 GMT"
```

Дмитрий Николаев

unread,
May 8, 2013, 11:29:28 AM5/8/13
to tumbl...@googlegroups.com
Ok, I tried YYYY-MM-DD HH:mm:ss (pseudo), but new post with body and date has not date I've passed, but current.

I will be very grateful if you could run your code  and test it in real battle. Does it work ?

среда, 8 мая 2013 г., 17:33:39 UTC+3 пользователь John Crepezzi написал:

John Crepezzi

unread,
May 8, 2013, 11:30:06 AM5/8/13
to tumbl...@googlegroups.com
I did run it :)

Дмитрий Николаев

unread,
May 8, 2013, 11:36:37 AM5/8/13
to tumbl...@googlegroups.com

Ok, Here is date: 2013-05-08 12:38:00

Do you see something wrong with it ? 


среда, 8 мая 2013 г., 18:30:06 UTC+3 пользователь John Crepezzi написал:

John Crepezzi

unread,
May 8, 2013, 11:42:39 AM5/8/13
to tumbl...@googlegroups.com
Depending on your time zone, that date could be in the future - which will then default to _now_
If you're trying to publish posts in the future, maybe queue is what you want?

Dmitry Nikolaev

unread,
May 9, 2013, 1:11:09 PM5/9/13
to tumbl...@googlegroups.com
Hi, 

Seems you are right! This is depends! And since Timezone was not set up properly in Tumblr account, the date become in future, so it make posts with current time.

Thanks for your time and help, John!

08.05.2013, в 17:32, John Crepezzi <j...@tumblr.com> написал(а):

You received this message because you are subscribed to a topic in the Google Groups "Tumblr API Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tumblr-api/ApQ4Z2S627A/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tumblr-api+...@googlegroups.com.

John Crepezzi

unread,
May 9, 2013, 1:20:47 PM5/9/13
to tumbl...@googlegroups.com
Any time - thanks Dmitry!
Reply all
Reply to author
Forward
0 new messages