Wednesday, December 13, 2017 02:13 am EST

Change the submitted variable in drupal 7

Bri's picture

Go to: /admin/config/regional/date-time/formats/add
Create desired time format, i.e. l, d/m/Y or see for available options.
Add format.
Go to: /admin/config/regional/date-time
Set medium data type into the desired one.


Anonymous's picture

Drupal is the common website

Drupal is the common website platform and the number of people is like this because everything is easily available and we can also modify our website according to requirements. Those reviews about version 7 would be pretty useful for the users.

Anonymous's picture


whats that all about?
care to explain?
just thought i would ask

Bri's picture

Not labeled quite right

I guess i didn't really title the article quite correct. It is really about changing the date format that is used in the $submitted variable. The date format can be changed, or new ones can be added using the method above.
If you really do want to change the $submitted variable, you can do so with a preprocess function. Something like...

function myTHEME_preprocess_node(&$variables) {
  if($variables['type'] == '[content_type]') {
    $variables['submitted'] = 'some new value';