Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 2018 08:05
    AndreiPiakhota opened #75
  • Jun 22 2018 12:31
    kamilgregorczyk commented #74
  • Jun 22 2018 12:31
    kamilgregorczyk edited #74
  • Jun 22 2018 12:31
    kamilgregorczyk edited #74
  • Jun 22 2018 12:30
    kamilgregorczyk edited #74
  • Jun 22 2018 12:28
    kamilgregorczyk opened #74
  • Feb 22 2018 13:21
    johnnynypa closed #73
  • Feb 21 2018 23:57
    johnnynypa opened #73
  • Oct 23 2017 13:50
    threestarsgenius commented #72
  • Oct 12 2017 16:54
    CasperHK edited #72
  • Oct 12 2017 16:53
    CasperHK edited #72
  • Oct 12 2017 16:52
    CasperHK opened #72
  • Sep 13 2017 17:12
    Allendar edited #71
  • Sep 13 2017 17:12
    Allendar closed #71
  • Sep 13 2017 16:20
    h3110w0r1d opened #71
  • Sep 06 2017 15:06
    Dexus commented #51
  • Sep 06 2017 14:48
    Dexus labeled #2
  • Sep 06 2017 14:39
    theodesp added as member
  • Sep 06 2017 14:39
    theodesp added as member
  • Sep 05 2017 15:19
    Dexus commented #70
Allendar
@Allendar
I think that was the issue, as I inserted an older date
So probably should force the date_of_birth field to be a string...
Josef Fröhle
@Dexus
then use a other format or virtual fields that converted to string or something
Allendar
@Allendar
How can you force truncate a char field in MariaDB? I made it CHAR(10), but tries to inject the time part too of the Time object. Can I let it force truncate without an error?
Allendar
@Allendar
system_time_zone    CEST
time_zone    SYSTEM
This doesn't look desirable : (
Guess I'll run SET SESSION time_zone = '+00:00'; on boot to be sure
Or can I set that in the connection params too?
Allendar
@Allendar
Fixed it
Josef Fröhle
@Dexus
how?
and sorry I was in a call.
Allendar
@Allendar
DateOfBirth             *string `gorm:"char(10)"`

// SetDateOfBirth it's Time value to a string value.
func (u *User) SetDateOfBirth(dateOfBirth *time.Time) {
    if nil == dateOfBirth || (0 == dateOfBirth.Year() && 0 == dateOfBirth.Month() && 0 == dateOfBirth.Day()) {
        u.DateOfBirth = nil
    } else {
        dateAsString := dateOfBirth.UTC().Format(globals.DateFormat)
        u.DateOfBirth = &dateAsString
    }
}

// DateOfBirthAsTime returns it's string value as a Time value.
func (u *User) DateOfBirthAsTime() *time.Time {
    if nil == u.DateOfBirth {
        return nil
    }
    date, err := time.Parse(globals.DateFormat, *u.DateOfBirth)
    if nil != err {
        panic(err)
    }
    return &date
}
Not really as I would want it, but I guess that's how systems become ugly over time..
Now running perror(DB.Exec("SET SESSION time_zone = '+00:00'").Error) on connect too
Allendar
@Allendar
Wish GORM could use BIGINT + nanotime natively while still getting/setting a time.Time object
Josef Fröhle
@Dexus
hi @Allendar
so some more feature and fixes on the way... maybe it should be v8 and not v7.4.x
Josef Fröhle
@Dexus
hi @theodesp
Josef Fröhle
@Dexus
What do you guy think about https://github.com/kataras/golog ?
I like it, because it has a better implementation then zap... and...
Josef Fröhle
@Dexus
hmm nobody there?
godofdream
@godofdream
golog looks slower than zap.
Josef Fröhle
@Dexus
yeah, but have a better API, maybe we need to wrapper it...
godofdream
@godofdream
also zap is maintained by uber guys and not kataras
Josef Fröhle
@Dexus
:+1:
godofdream
@godofdream
i don't understand you issues with the api
also remember any funtion calls (like wrappers) have some overhead
Josef Fröhle
@Dexus
you need be able to configure zap but its yet a fixed developer setup
godofdream
@godofdream
I'm having issues getting the profiler to work
app.Get("/debug/pprof/{action:string}", pprof.New()) seems not to work
is the pprof middleware outdated?
Josef Fröhle
@Dexus
no
what are you trying? to call /debug/pprof/ ?
app.Get("/debug/pprof/{action:string}", pprof.New())
app.Get("/debug/pprof/", pprof.New())
Allendar
@Allendar
The count route wants to post too. I had this discussion with Kataras before too, but it got deleted with his old support website
app.Any("/debug/pprof/{action:path}", pprof.New())
Might work for you
Havent used pprof in a while tho
Allendar
@Allendar
Also cant skip invalid TLS for pprof
Josef Fröhle
@Dexus
hmm, sould i report Iris bugs?
godofdream
@godofdream
yes why not
Josef Fröhle
@Dexus
because I'm blocked ^^
godofdream
@godofdream
or create a fakeaccount to fill the bug XD
lol this stupidity
Josef Fröhle
@Dexus
I can't fork kataras repos...
Josef Fröhle
@Dexus
I have kataras written on facebook, let me see what it brings..
godofdream
@godofdream
hm lets see what happens
Josef Fröhle
@Dexus
he has answert
Josef Fröhle
@Dexus
we have a bug in the router... Iris too.
it bases on the Static* functions or has todo with it..