Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente bannato
    Registrato dal
    Oct 2011
    Messaggi
    185

    Stampo time(); e mi da un strano errore

    Strict Standards: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST'



    solo se inserisco in cima
    error_reporting(E_ALL | E_STRICT);

    mi stampa l'errore

    come posso rimuovere l'errore senza togliere error_reporting(E_ALL | E_STRICT);
    ?


    quello che facico è semplicemente
    echo $timestamp=time();

  2. #2
    Utente bannato
    Registrato dal
    Oct 2011
    Messaggi
    185
    anzi no

    faccio cosi


    $timestamp2= mktime($data3[0],$data3[1],$data3[2],$data[1],$data2[0],$data[0]);


    rispettivamente ore minuti e secondi mese giorno anno

  3. #3
    nel php.ini devi impostare il timezone e il warning sparisce

    codice:
    [Date]
    ; Defines the default timezone used by the date functions
    date.timezone = "Europe/Rome"
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.