# Trouble with times within countries

**URL:** https://forum.servoy.com/t/trouble-with-times-within-countries/13857
**Category:** Classic Servoy
**Created:** [April 14, 2011, 12:35pm UTC](https://forum.servoy.com/t/trouble-with-times-within-countries/13857 "2011-04-14T12:35:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![maservoy](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@maservoy](https://forum.servoy.com/u/maservoy)
#### Post date: [April 14, 2011, 12:35pm UTC](https://forum.servoy.com/t/trouble-with-times-within-countries/13857/1 "2011-04-14T12:35:38Z")

</div>

Hi,  
I’m having trouble with managing times between Spain and Portugal. This is the case:

If users execute Servoy under Spanish language, everything works fine.  
If users start using the Portuguese language, Servoy raises an error.

The code that raises the error is the following one (where _globals.age\_\_fechaSeleccionada_ is a datetime global variable):

if (controller.find())  
{  
fechacitasinhora\_cl = utils.dateFormat(globals.age\_\_fechaSeleccionada,‘dd/MM/yyyy HH:mm’)  
controller.search()  
}

The error I get on Servoy’s server log is:  
2011-04-14 13:38 || AWT-EventQueue-0 || INFO || com.servoy.j2db.util.Debug || **Cannot parse 14/04/2011 00:00 using format dd-MM-yyyy H:mm**  
Is Servoy trying to use a default timezone and format because users are using the Portuguese language??  
Thanks in advance for your help,  
Miguel.-

---

<div class="post-metadata">

### Author: ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)
#### Post date: [April 14, 2011, 2:06pm UTC](https://forum.servoy.com/t/trouble-with-times-within-countries/13857/2 "2011-04-14T14:06:44Z")

</div>

is the error really generated in this call:

utils.dateFormat(globals.age\_\_fechaSeleccionada,‘dd/MM/yyyy HH:mm’)

that looks very weird to me, because parsing is String to Date, Date to String what you do is formatting.

Is it not just the input the user does in the field that generates that warning? Does it get red when you fill something in?  
Do you have a date format set on that field? or do you use the default?
