TimeZone for created_at - pinterest

I was wondering if anyone knows what TimeZone the created_at field for pins from the Pinterest API is in? It doesn't seem to specify in the documentation and it doesn't have any TimeZone information in the response data.

Related

How to development multi language application in spring?

I want to development multi language application. but I can't find detail information ve documents. How to get rows of current language data? When the user language changes, I want the data suitable for that language to come.
database model I'm considering
News
id
image
created_at
updated_at
NewsTranslation
id
title
description
locale
created_at
updated_at

how to set my custom timestamp in laravel?

how to change timestamp to myCustomTimestamp, for example jalali timestamp
e.g : 2015-10-6 convert to 1993-7-6 and saved as created_at or updated_at in database.
I managed to find this laravel bundle, which would help you tackle jalali dates more easily - https://github.com/sallar/laravel-jdate .
I think, however, that the easier approach would be to specify your created_at and updated_at dates explicitly when doing insert/update operations, rather than extending the Eloquent class and overwriting the setUpdatedAt(), setCreatedAt() and updateTimestamps() methods (which I don't know, if it would even work and not break something).

created_at column is taking junk date in magento when editing the customer

I’m using Magento 1.6.1CE.
I have set the default time zone to Australia/Perth. my server also running in the same time Zone.
when creating the customer there is no issue with created_at column in DB and Customer Since column in admin html.
But when edit the details and Update no problem in saving but Customer Since column is taking some junk date like 30/11/00-1 1:30:00 AM or 01/01/1970 9:30:00 AM. so I’m unable to edit it next time(showing Exception handling is disabled)
when I see in the DB created_at it is showing 0000-00-00 00:00:00.
Please let me know how can I solve this problem. I’m new to Magento Coding.
Thanks in Advance…
I had similar issue once. It's because Magento assumes a specific date format, which depends on your locale.
By default Magento uses format Month/Day/Year. In your case it seems like Magento acutally shifts Day and Month. So, make sure that "Locale" and "Timezone" in System > Configuration > General > Locale Options match.
If they match and you still get this issue, then you will can try to rewrite customer edit block or a controller action.

Changing updated_at in a Rails record

I have a memory based session table containing the following:
id
sessnhash
userid
created_at
updated_at
The idea is that when a user first logs in a random sessnhash is created and passed back so that all further actions have to send that sessionhash for server requests. These go through a loggedin? method on the application controller which simply checks that a row in the table exists for that sessionhash.
I now want to extend this functionality to keep a tab of the last time any activity happened for that user and I thought one of way of doing this would be to immediately do a save after finding the sessionhash, hoping that this would then update the 'updated_at' attribute.
However Rails is too clever and doesn't update anything as in reality nothing has been updated.
Is there any way of forcing Rails to update the updated_at attribute without having to make any data changes to any of the other attributes?
I've just learnt that I need to do.
sessn.touch
which will update the updated_at attribute.
It's all in here: touch.

Hibernate Timestamp with Timezone

I'm new to Hibernate and am working with an Oracle 10g database. We have columns in our tables that are of type TIMESTAMP WITH TIMEZONE. Hibernate does not seem to support this mapping directly. Is there a standard way to go about this?
An example of a UserType storing java.util.Calendar with time zone information is given in this blog post: http://www.joobik.com/2010/12/mapping-dates-and-time-zones-with.html
TIMESTAMP WITH TIMEZONE is Oracle extension and thus is not supported by Hibernate out of the box. You have two options:
1) Change your table structure to store timezone in a separate column (as VARCHAR2). Hibernate is able to map java.util.TimeZone as timezone type using its ID.
2) Write a custom class to hold both timestamp and timezone and a custom UserType that would persist it. It will have to be a CompositeUserType if you need the ability to use its individual properties (e.g. timezone or timestamp) in queries. Look at this example to get you started; you'll need to alter it to actually store the timezone.

Resources