Fuso Horário
#1
Posted 28/06/2008, 11:39
Imaginem um formulário onde a pessoa digita uma ocorrencia de invasão de maquina nesta
data, neste horário e neste fuso horário.
Eu queria poder converter sempre para o fuso horário de brasília, idependente do fuso horário que o cara digitasse, pois o fuso horário poderia ser o de tóquito por exemplo que são (+0900) ,ou seja, 12 horas a mais que o horário oficial de brasília.
Data: 16/08/2006
Hora: 15:30
Fuso: -0600 (este é o fuso em Orlando la na flórida nos Estados Unidos)
--------------------------------------------------------------------------------
Eu ja tentei usar isso aqui, mas isso aqui sempre pega o horário de brasília (15:30 neste caso) e joga pro horário universal que seria 18:30. Então queria saber se existe alguma função que trabalhe com a data, hora e que eu possa eu mesmo inserir o fuso horário.
echo gmdate("d/m/Y H:i:s", mktime(15, 30, 00, 8, 16, 2006));
#2
Posted 28/06/2008, 12:06
Não entendi muito bem, mas existe a função date_default_timezone_set() (PHP5+) que define o timezone usado em data/hora da aplicação.
Se não for isto, tem como especificar melhor o problema? Até mais
#3
Posted 28/06/2008, 15:03
Hummm...
Não entendi muito bem, mas existe a função date_default_timezone_set() (PHP5+) que define o timezone usado em data/hora da aplicação.
Se não for isto, tem como especificar melhor o problema?
vou tentar explicar melhor.
o sistema que eu estou fazendo precisa cadastrar um IP que foi usado para invadir um banco por exemplo, imagine que este IP estava sendo usado por alguem em Tókio.
entao eu cadastro a data da ocorrencia que me foi enviada pelo JUIZ do tribunal
data da Ocorrencia: 25/05/2007
hora da ocorrencia: 18:30 (esta é a hora em Tókio no momento da invasão)
fuso horário: 0900 (este é o fuso horário em que Tókio se localiza (09:00)
eu quero pegar essa hora que a pessoa digitou e converter para o fuso horário do Brasil, ou seja, são 12 horas a menos de diferença, no Brasil seria 06:30 da manha do dia 25/05/2007 quando esta invasão aconteceu
O Brasil está localizado no fuso horário (-03:00)
#4
Posted 30/06/2008, 01:36
<?
$dia=25;
$mes=05;
$ano=2007;
$hora=18;
$min=30;
$novo='-12:00'; //novo fuso ?
echo date("d/m/Y H:m",strtotime($novo,mktime($hora,$min,0,$mes,$dia,$ano)));
?>
Edição feita por: lwirkk, 30/06/2008, 01:36.
"Se quiser ser feliz por um dia, vingue-se; se quiser ser feliz por uma vida inteira, perdoe."
Muito Obrigado à todos do fórum, e à toda equipe do fórum!
#5
Posted 30/06/2008, 12:20
$diferencaFuso = ( date('O') - '-0300' ) / 100;
date('O') pega o fuso atual do navegador.
exemplo ... fuso +0900 , $diferencaFuso retorna 12.
#6
Posted 16/10/2017, 21:04
#7
Posted 17/10/2017, 03:15
Discounts! 10 best beauty products
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).
READ MORE
20 24 28 Inch Youyima Travel Luggage Suitcase ABS Business Trolley Wheel Rolling Suitcase High Quality Spinner Traveling Case ( 220.00 $)
24 ( 80.70 $)
Original Xiaomi Roidmi 2S Bluetooth V4.2 Hands-free 5V 2.4A Car Charger FM Transmitter 39.00$
Chic elastic waist pocket design floral print women's pants ( 14.35 $)
Brazilian virgin hair with closure,3 bundles with 1pc lace closure,4pcs virgin human hair weave brazilian body wave with closure ( 97.53 $)
Dr.Web CureIt! 10.0.7 Rus [2017-03-11]
New Halloween Exotic cosplay uniform underwear women lace French Cosplay Uniform maid sexy lingerie costume set fancy dress ( 3.14 $)
Laconic pu leather and letter print design women's tote bag ( 21.57 $)
Big bag2016 women's beach fashion waterproof color kipled handbag large shoulder bag handbag casual female bolsa shopping bags ( 20.74 $)
Demill, Sesil Blaunt
Hot car styling cob cars headlight led h4 h1 h7 h8 h9 h11 9005 9006 880 881 40w 8000lm 6000k led headlamp kit drl fog lamp bulbs ( 39.00 $)
Anti-scratch Original VKWORLD VK700 Pro Tempered Glass Screen Protector Film ( $2.32 )
2016 new arrival fashion brand luxury mens wallets designer pu nubuck leather men purse short style ( 14.99 $)
Spiffy short side bang fashion shaggy wavy capless 100 percent human hair wig for women ( 31.54 $)
Fuchsia Fonce Cotton Tiger Espadrille ( 145.00 $)
Discounts! funny product reviews
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).
READ MORE
True freesia bulbs,flower freesia,Indoor Pot Flowers Orchids,Freesia Rhizome flower bulbs,Floral quiet home garden plant-2bulbs ( 1.66 $)
3 colors pet dog cat car rear back seat waterproof carrier cover pet mat blanket hammock cushion protector and clean for car ( 23.10 $)
Hot flap v women's luxury leather black clutch bag ladies handbags brand women messenger bags sac a main femme 2016 short handle ( 31.19 $)
Hot rechargeable foot care tool + 6 roller electric pedicure peeling dead skin removal feet care machine personal care for feet ( 36.85 $)
2 5d 0 3mm 9h premium tempered glass for xiaomi redmi 2 redmi note 2 note ( 0.80 $)
Wallet men's pu leather long zipper purse business style curewe kerien wallet 2016 new card cash receipt holders card id holders ( 28.88 $)
Quilted Eco Leather Mini Clutch ( 55.50 $)
Natural look high quality light blonde silky straight wig with parting glueless synthetic lace front wigs heat resistant fiber ( 45.00 $)
Paint coat car-covers ceramic pro liquid glass coating car wax motorcycle paint care ceramic 9h coating car paint scratch repair ( 87.80 $)
F — wheel FL — i1 Icarbot Scooter-367.47 $
Solar charger power bank 12000mah portable charging powerbank external battery chargers bateria externa for iphone mobile phones ( 25.86 $)
Red velvet open toe boot wmirror heel ( 212.91 $) MM6 Maison Martin Margiela
Best salon barber instant hair styling powder toppik hair fiber thickening keratin hair fibre concealer hair loss 27.5g ( 25.98 $)
Aukey 36w dual usb port travel wall charger with qualcomm quick charge 3.0 for motorola nexus 6 and more smartphone ( 24.99 $)
Hard PC Protective Cover Case with Solid Color for Apple Watch 38mm ( $2.05 )
Discounts! best new hair products 2017
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).
READ MORE
Inleela 2016 the most popular women long wallet quilted vintage coin purse fashion and soft large card holder ( 20.00 $)
Man PU Classic Wallet ( $2.58 )
Brazilian virgin ombre human hair wig silky straight full lace wig two tone lace front human hair wig for black women ( 122.49 $)
V stolice ozhidaetsya ledyanoj dozhd
6A unprocessed human hair brazilian virgin hair body wave customized 8-32 inches hair extensions brazilian hair weave bundles ( 30.00 $)
Anet A8 Desktop 3D Printer Prusa i3 DIY Kit ( 169.99 $)
Urban dark brown leather mens sneaker ( 141.54 $) D Acquasparta
KEYES KY-006 Passive Buzzer Module ( $1.05 )
Kerol (film)
Onda V96 3G Phablet-88.33 $
Bluedio N2 Sports Bluetooth V4.1 Hands Free Earphone Dual Earplugs with Mic for Tablet PC Smartphones-8.59 $
Elizabeth royal navy suede pump ( 179.74 $) Tory Burch
Makeup waterproof matte velvet liquid lipstick long lasting lip gloss cosmetics free shipping ( 1.01 $)
OZERO Men's Ski Gloves Snowboard Gloves Snowmobile Motorcycle Riding Winter Gloves Windproof Waterproof Unisex Snow Gloves 9008 ( 49.90 $)
Hantajanss children backpack winx monster high butterfly girls school bags primary backpack school student orthopedic schoolbags ( 25.25 $)
Discounts! hair styling products Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked! If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included). READ MORE Kaspersky Virus Removal Tool 2015 [2017-02-25]U119 Free Shipping 50x Fan-shaped Natural False Tips Sticks Polish Display Nail Art supply selling ( 1.87 $)Clinics and diagnostic centers - meds.ru"Vremya pervih": kosmicheskaya drama o pervom vihode cheloveka v kosmosHumanhair bulk deep wave with closure summer short women's hair peruvien deep wave with closure west kiss virginhair 6 bundles ( 79.90 $)Blue el glasses El Wire Fashion Neon LED Light Up Shutter Shaped Glow Rave Costume Party DJ Bright Glasses ( 10.68 $)TenOnline shop women clothes, dresses, jewelry and leather goods - Lapana.ruClothing Austin: women's, men's and children's collections. Online clothing shop O'STIN: order and buy clothing online with shipping. Prices. Official site.Old Style - Skull Cufflinks ( 85.00 $)2pcs h7 100w 12v halogen bulb super white fog lights high power 55w car headlight lamp ( 1.58 $)"Life is Beautiful"Italian yaki full lace wig with baby hair 130 malaysian light yaki ponytail wig virgin italian yaki lace front human hair wig ( 100.94 $)Folsom metallic leather wedge ( 298.50 $) Zoe LeeX-travel 30 nylon spinner ( 153.53 $) Bric s
0 user(s) are reading this topic
0 membro(s), 0 visitante(s) e 0 membros anônimo(s)